note 76987 deleted from pdostatement.fetch by danbrown

From: Date: Tue, 21 Jun 2011 15:07:26 +0000
Subject: note 76987 deleted from pdostatement.fetch by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-180812@lists.php.net to get a copy of this message
Note Submitter: jdriddle_producer at yahoo dot com ---- >> 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);

« previous php.notes (#180812) next »