Re: MDB2 help needed
| From: | Laura Longo | Date: | Thu, 12 Jun 2008 15:27:27 +0000 |
| Subject: | Re: MDB2 help needed | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45058@lists.php.net to get a copy of this message | ||
Hi Yves,
to understand if an error is occured you can use the static method
Pear::isError($db) where $db is an instance of MDB2 object.
To get the specific error you can use the MDB2 method getMessage()
($db->getMessage()).
Hope this help,
Laura
> Hello,
>
> What's the equivalent of mysql_error() and mysql_errno() in MDB2?
>
> When I'm sending an incorrect SQL-statement to the server and it fails, all
> I'm getting is "MDB2 Error: syntax error".
>
> Thanks in advance,
>
> Yves Sucaet
> Iowa State University
>
>
>