Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14114

Is there a way to close cursor in PDO ?

$
0
0
Im getting error 

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.

The problem can be solved by using statements given below by using any one of them :
    i)  $statement->closeCursor();
    ii) $db->setAttribute (PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);

So, how do I achieve this in codeigniter ?

Viewing all articles
Browse latest Browse all 14114


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>