note 101758 added to pdo.errorinfo
| From: | alagar86 at gmail dot com | Date: | Sun, 09 Jan 2011 21:29:07 +0000 |
| Subject: | note 101758 added to pdo.errorinfo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175586@lists.php.net to get a copy of this message | ||
Please note : that this example won't work if PDO::ATTR_EMULATE_PREPARES is true.
You should set it to false
$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES,false);
$stmt = $dbh->prepare('bogus sql');
if (!$stmt) {
echo "\nPDO::errorInfo():\n";
print_r($dbh->errorInfo());
}
----
Server IP: 69.147.83.197
Probable Submitter: 89.28.16.234
----
Manual Page -- http://www.php.net/manual/en/pdo.errorinfo.php
Edit -- https://master.php.net/note/edit/101758
Del: integrated -- https://master.php.net/note/delete/101758/integrated
Del: useless -- https://master.php.net/note/delete/101758/useless
Del: bad code -- https://master.php.net/note/delete/101758/bad+code
Del: spam -- https://master.php.net/note/delete/101758/spam
Del: non-english -- https://master.php.net/note/delete/101758/non-english
Del: in docs -- https://master.php.net/note/delete/101758/in+docs
Del: other reasons-- https://master.php.net/note/delete/101758
Reject -- https://master.php.net/note/reject/101758
Search -- https://master.php.net/manage/user-notes.php