willpower Posted January 1, 2008 Share Posted January 1, 2008 I want to see what errors are generated so i have the or die (mysql_error()) included in my queries. BUT this stops the script and i want it to continue to run...how would i accomplish this. Will Link to comment https://forums.phpfreaks.com/topic/84031-alternative-to-or-die-mysql_error/ Share on other sites More sharing options...
teng84 Posted January 1, 2008 Share Posted January 1, 2008 instead of die use else eg if($query){ stuff here } else { echo mysql_error(); } Link to comment https://forums.phpfreaks.com/topic/84031-alternative-to-or-die-mysql_error/#findComment-427649 Share on other sites More sharing options...
Daniel0 Posted January 1, 2008 Share Posted January 1, 2008 You could throw an exception and catch it. http://php.net/exceptions Link to comment https://forums.phpfreaks.com/topic/84031-alternative-to-or-die-mysql_error/#findComment-427660 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.