On a fully tested system, the sql statements are all without errors.
1) We still should use the
$result=$mysql_query(...) or die(mysql_error());
instead of just
$result=$mysql_query(...);
Because, the database connection problems (not total failure) could still fail some queries and let some queries running. Which you don't want to see. So we still have to exit, even if only one query failure. Right?
2) Should I use
$result=$mysql_query(...) or die("database connection failure, inform the admin.");
instead of use
$result=$mysql_query(...) or die(mysql_error());
instead of show the mysql_error in the pages for the end users. On a fully tested system or at any systems, there are no reasons at all to show the end users the mysql_error(), mysql_error() should be only for the developers used on the system under developing, right?
Thanks!