Good point Alex!
Another tip is to always perform your own error handling. For example:
PHP Code:
<?php
$query = "SELECT * FROM my_table WHERE my_field='some_value'";
// note that I preceed all mysql calls with @ to supress the default error handling
$result = @mysql_query($query);
// now I am testing to see if I get a valid result
if ( ! $result) {
echo @mysql_error();
break;
}
// now I process the results
while ($my_row = @mysql_fetch_assoc($result)) {
// here I do something spectacular with the data
}
?>
