I am trying to learn best practices. Is it necessary or advisable to have error handling built into every statement, or is it OK to be more concise? Is there any advantage of one over the other of these 2 ways of doing the same thing? What happens if you remove the error handling and there is an error? Thanks.
Code:$sql = "SELECT COUNT(*) FROM table"; $result = mysql_query($sql,$connection) or die("Couldn't execute $sql query. <br> mysql error: ".mysql_error()); ?>Code:$result = mysql_query("SELECT COUNT(*) FROM table");



Reply With Quote
e

Bookmarks