note 76987 added to function.pdostatement-fetch
| From: | jdriddle_producer at yahoo dot com | Date: | Thu, 09 Aug 2007 00:28:55 +0000 |
| Subject: | note 76987 added to function.pdostatement-fetch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129363@lists.php.net to get a copy of this message | ||
>> note that fetch constants are not included in the PDO class for PHP versions prior to 5.1
They appear to not exist in 5.2.3 either, as I am getting the following error:
Notice: Use of undefined constant PDO_FETCH_ASSOC - assumed 'PDO_FETCH_ASSOC' in
C:\Documents and Settings\driddle.AUTISMSPEAKS.000\My Documents\ascentral\sqlite_test.php on line 36
Warning: PDOStatement::fetchAll() expects parameter 1 to be long, string given in C:\Documents and
Settings\driddle.AUTISMSPEAKS.000\My Documents\ascentral\sqlite_test.php on line 36'
Code to reproduce:
// retrieve and output info from db
$sqlGetEvent = 'SELECT * from calendarItem';
$result = $dbHandle->query($sqlGetEvent);
$data = $result->fetchAll(PDO_FETCH_ASSOC);
----
Server IP: 208.69.120.35
Probable Submitter: 38.98.62.2
----
Manual Page -- http://www.php.net/manual/en/function.pdostatement-fetch.php
Edit -- https://master.php.net/note/edit/76987
Del: integrated -- https://master.php.net/note/delete/76987/integrated
Del: useless -- https://master.php.net/note/delete/76987/useless
Del: bad code -- https://master.php.net/note/delete/76987/bad+code
Del: spam -- https://master.php.net/note/delete/76987/spam
Del: non-english -- https://master.php.net/note/delete/76987/non-english
Del: in docs -- https://master.php.net/note/delete/76987/in+docs
Del: other reasons-- https://master.php.net/note/delete/76987
Reject -- https://master.php.net/note/reject/76987
Search -- https://master.php.net/manage/user-notes.php