note 117451 deleted from pdostatement.errorinfo by cmb
| From: | cmb@php.net | Date: | Thu, 11 Jun 2015 09:52:18 +0000 |
| Subject: | note 117451 deleted from pdostatement.errorinfo by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-202841@lists.php.net to get a copy of this message | ||
Note Submitter: Deuchnord
----
Note that if no error occurs when executing the query, the array returned by this function will only
contain one value which will be 0.
So you can easily check if an error has occured in this way:
<?php
$listOfUsers = $db->query('SELECT name from uesrs');
if($listOfUsers[0] != 0)
die($listOfUsers[2]);
?>