Skip to main content
Topic: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffer (Read 613 times) previous topic - next topic

SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffer

I created a query for 'pivoting' using mySQL. Followed the method described here:

https://www.tarynpivots.com/post/how-to-rotate-rows-into-columns-in-mysql/

Unfortunately I am getting this 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.

I have attached an sql export of the data I'm using. This is the underlying query which works well on MySQL on a WAMP instance on my PC. And also attached is the query I used.

Really need help on this. Would very much appreciate your help.

Thanks,
Arno