Reputation: 843
I have a very simple development. I was using Pear DB to error catch a query with something along the lines of
if(DB::isError($create)) die($create->getMessage());
I'm wondering if there is something similar in mysql?
Upvotes: 0
Views: 1441
Reputation: 1040
Pear DB is Database Abstraction Layer which works with MySQL.
MySQL:
$res = mysql_query($query);
if(mysql_error()) { die('error!:' . mysql_error() ); }
Upvotes: 1