note 117451 added to pdostatement.errorinfo

From: Date: Thu, 11 Jun 2015 08:44:00 +0000
Subject: note 117451 added to pdostatement.errorinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-202832@lists.php.net to get a copy of this message
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]); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 163.116.6.11 ---- Manual Page -- http://php.net/manual/en/pdostatement.errorinfo.php Edit -- https://master.php.net/note/edit/117451 Del: integrated -- https://master.php.net/note/delete/117451/integrated Del: useless -- https://master.php.net/note/delete/117451/useless Del: bad code -- https://master.php.net/note/delete/117451/bad+code Del: spam -- https://master.php.net/note/delete/117451/spam Del: non-english -- https://master.php.net/note/delete/117451/non-english Del: in docs -- https://master.php.net/note/delete/117451/in+docs Del: other reasons-- https://master.php.net/note/delete/117451 Reject -- https://master.php.net/note/reject/117451 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202832) next »