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 Quote 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(); } Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.