The array becomes

array(2) { ["adapter"]=> string(9) "Pdo_Mysql" ["params"]=> array(6) { ["host"]=> string(9) "localhost" ["username"]=> string(11) "" ["password"]=> string(13) "" ["dbname"]=> string(12) "s" ["profiler"]=> array(1) { ["enabled"]=> string(4) "true" } ["driver_options"]=> array(1) { [1000]=> bool(true) } } }

Its still happening !

On 12/11/2007, at 4:01 PM, Dan Rossi wrote:

I'm guessing this has to do cant set pdo options in xml configs. And setAttribute is ideal but wont work until the connection is made.

$dbConfig = $config->database->toArray();
$dbConfig['params']['driver_options'] = array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY=>true); $db = Zend_Db::factory($config->database->adapter, $dbConfig['params']);
$db->setFetchMode(Zend_Db::FETCH_ASSOC);
$registry->set('db', $db);

On 12/11/2007, at 3:48 PM, Dan Rossi wrote:

Aparantly this is also possible but only when a connection is made so after the first query unless db connect is made.

$db->getConnection()- >setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,true);


Exceptions are bubbled up to the error controller.

On 12/11/2007, at 3:23 PM, till wrote:

On Nov 11, 2007 11:09 PM, Dan Rossi <[EMAIL PROTECTED]> wrote:
Ive tried to also add the config to the config object but there is issues
with it


$config->database->driver_options = array();
$db = Zend_Db::factory($config->database);

Fatal error: Uncaught exception 'Zend_Config_Exception' with message
'Zend_Config is read only' in

Sorry man, but isn't the error obvious? You tried to manipulate your
Zend_Config object but you are not supposed to.

A try/catch block around that should help you out.

On 12/11/2007, at 3:00 PM, Dan Rossi wrote:

Hi there still getting these errors, it doesnt seem that Zend_Db is actually calling fetchAll on the PDO library, the result isnt being free'd so im
getting this error

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.

Any ideas ? I cant seem to append this option as i use xml for the configs.

What does one have to do with the other?

To set pdoparams, Example 10.7:
http://framework.zend.com/manual/en/zend.db.html

Cheers,
Till



Reply via email to