note 109041 modified in pdostatement.execute by danbrown
| From: | danbrown@php.net | Date: | Fri, 15 Jun 2012 15:58:16 +0000 |
| Subject: | note 109041 modified in pdostatement.execute by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188633@lists.php.net to get a copy of this message | ||
If your MySQL table has 500,000+ rows and your script is failing because you have hit PHP's
memory limit, set the following attribute. <?php
$this->pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
?> This should make the error go away again and return
memory usage back to normal.
--was--
If your MySQL table has 500,000+ rows and your script is failing because you have hit PHP's
memory limit, set the following attribute.
$this->pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
This should make the error go away again and return memory usage back to normal.
http://php.net/manual/en/pdostatement.execute.php