If people are having troubles with multiple PDO statements, abstract
query calls Pdo_Statement, there is a method called "closeCursor"
though im not sure if it entirely removes it, this is now working,
sorry about the trouble,
$result = $this->db->query("CALL FormatsList()");
$result->fetchAll();
$result->closeCursor();
$result = $this->db->query("CALL FormatsList()");
$result->fetchAll();
$result->closeCursor();
also calling this before the second query works so no need to "close
cursor" which leaves it open, it doesnt seem the "driver_option" does
anything when sent to the PDO so possibly a bug with PDO.
$this->db->getConnection()-
>setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
It would be good if the actual Zend_Db layer called fetchAll on the
pdo as aparantly this is the portable option fix.
On 12/11/2007, at 8:36 PM, Dan Rossi wrote:
This breaks
$result = $this->db->query("CALL FormatsList()");
$result->fetchAll();
$result = $this->db->query("CALL FormatsList()");
$result->fetchAll();
this doesnt
$this->db->getConnection()->query("CALL FormatsList()");
$result = $this->db->getConnection()->store_result();
$this->db->getConnection()->query("CALL FormatsList()");
$result = $this->db->getConnection()->store_result();
Im guessing this is the same issue for PDO though it might be a much
bigger problem where the driver options dont affect anything. It
could just be damn FreeBSD where the problem is occuring compared to
my osx machine.
If i can work out how to free the result that might be a start,