RE: [PHP-DB] Catch Errors
| From: | John W. Holmes | Date: | Sun, 30 Mar 2003 17:47:26 +0000 |
| Subject: | RE: [PHP-DB] Catch Errors | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26724@lists.php.net to get a copy of this message | ||
> Is it possible to catch the type of error message returned form a
> mysql_query(); funtion
>
> for example
>
> if ($error == //duplicate row for table)
> {
> echo "This row already exists in the table";
> }
Use mysql_error() and mysql_errno().
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/