note 98358 deleted from pdostatement.fetchall by danbrown

From: Date: Thu, 10 Jun 2010 15:55:05 +0000
Subject: note 98358 deleted from pdostatement.fetchall by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170025@lists.php.net to get a copy of this message
Note Submitter: Dennis ---- Error: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. If you're using something like: while ($row = $query->fetchObject()) { [...] } try using this instead: $rows = $query->fetchAll(PDO::FETCH_CLASS, 'ArrayObject'); foreach ($rows as $row) { [...] }

« previous php.notes (#170025) next »