#35202 [Opn->Asn]: errorCode() Returns String
| From: | helly@php.net | Date: | Sat, 12 Nov 2005 19:13:42 +0000 |
| Subject: | #35202 [Opn->Asn]: errorCode() Returns String | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-88080@lists.php.net to get a copy of this message | ||
ID: 35202
Updated by: helly@php.net
Reported By: lists at zaunere dot com
-Status: Open
+Status: Assigned
Bug Type: PDO related
Operating System: Windows XP
PHP Version: 5.1.0RC4
-Assigned To:
+Assigned To: wez
New Comment:
SQL error codes are strings
Previous Comments:
------------------------------------------------------------------------
[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