php - Should you always end mysql queries with "or die?" -
Example queries end in some tutorials:
or die (mysql_error ( ));
I can see that you sometimes want to do this, but they also use it for questions which should not really cause any problem. Is it always a good practice to use it, or are they just doing it to help you learn it?
Avoid at all costs! The first transfers money from X to Y and succeeds, secondly, it will have to subtract X from wi fail . You have no way to return the transaction and the error is not logged. Effective user u happy and left x, where money went confused ... Use a sensible error management for questions - either to create a class that uses ORM for you or Will do No
Comments
Post a Comment