ID: 35202 Updated by: [EMAIL PROTECTED] Reported By: lists at zaunere dot com -Status: Assigned +Status: Bogus Bug Type: PDO related Operating System: Windows XP PHP Version: 5.1.0RC4 Assigned To: wez New Comment:
errorCode() returns a SQLSTATE string, as documented. Use errorInfo() to obtain driver specific error information. Previous Comments: ------------------------------------------------------------------------ [2005-11-12 20:13:41] [EMAIL PROTECTED] SQL error codes are strings ------------------------------------------------------------------------ [2005-11-12 20:11:20] lists at zaunere dot com Description: ------------ The errorCode() method of both the PDO and PDOStatement objects return a string, rather than an integer, as documented. If there is no error, they return an empty string. Reproduce code: --------------- $stmt = $MyPDO->prepare('SELECT * FROM MyTable'); var_dump($stmt->errorCode()); Expected result: ---------------- int(0) Actual result: -------------- string(0) "" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35202&edit=1