Handling errors and continuing execution in PHP script -


i don't want "die()" when concerns small part of script , tried:

$result = mysql_query($sql) or echo("error responses"); 

but generated error. how give out error message , continue execute rest of script since if fails connect, rest should not affected.

$result = mysql_query($sql); if(mysql_error()) {   echo "error: " . mysql_error(); } 

Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -