From 933b806b143e44ea149905da4eed1190b402a8af Mon Sep 17 00:00:00 2001 From: Lorenzo Alberton Date: Sat, 6 Jan 2007 21:53:54 +0000 Subject: [PATCH] Request #9708: MySQL/MySQLi error codes for MySQL 5 (patch by Adam Harvey) git-svn-id: http://svn.php.net/repository/pear/packages/MDB2/trunk@226599 c90b9560-bf6c-de11-be94-00142212c4b1 --- MDB2/Driver/mysql.php | 3 +++ MDB2/Driver/mysqli.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/MDB2/Driver/mysql.php b/MDB2/Driver/mysql.php index 8959c437..68494898 100644 --- a/MDB2/Driver/mysql.php +++ b/MDB2/Driver/mysql.php @@ -151,6 +151,9 @@ function errorInfo($error = null) 1146 => MDB2_ERROR_NOSUCHTABLE, 1216 => MDB2_ERROR_CONSTRAINT, 1217 => MDB2_ERROR_CONSTRAINT, + 1356 => MDB2_ERROR_DIVZERO, + 1451 => MDB2_ERROR_CONSTRAINT, + 1452 => MDB2_ERROR_CONSTRAINT, ); } if ($this->options['portability'] & MDB2_PORTABILITY_ERRORS) { diff --git a/MDB2/Driver/mysqli.php b/MDB2/Driver/mysqli.php index 208f3c9a..0795d935 100644 --- a/MDB2/Driver/mysqli.php +++ b/MDB2/Driver/mysqli.php @@ -152,6 +152,9 @@ function errorInfo($error = null) 1146 => MDB2_ERROR_NOSUCHTABLE, 1216 => MDB2_ERROR_CONSTRAINT, 1217 => MDB2_ERROR_CONSTRAINT, + 1356 => MDB2_ERROR_DIVZERO, + 1451 => MDB2_ERROR_CONSTRAINT, + 1452 => MDB2_ERROR_CONSTRAINT, ); } if ($this->options['portability'] & MDB2_PORTABILITY_ERRORS) {