I get this error:
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.
How do you set this PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute?
There’s an example at http://docs.php.net/manual/en/ref.pdo-mysql.php#pdo.constants.mysql-attr-use-buffered-query :
(But if this is really a good solution to your problem is another question….)