title: Different solution to `Cannot execute queries while other unbuffered queries are active`
body: <p>I've just migrated from MySQL to newer MariaDB and all my websites are now showing:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>I googled this error and tried doing what people suggested. </p>
  
  <p>So I changed my code to use PDO's <code>closeCursor()</code>.
  I tried using <code>PDO::MYSQL_ATTR_USE_BUFFERED_QUERY</code> and nothing works.</p>