Thanks Bill,

I am running ZF 0.7 therefore I had to add the following line to the
Zend/Db/Adapter/Abstract.php file as per the info on the URI you posted
$this->_connect();

Obviously I shouldn't edit any library files but I did it as a quick fix
since 0.8 will be released soon.

Once I had done this I could include the following code without problem:
$db->getConnection()->setAttribute (PDO::ATTR_EMULATE_PREPARES, true);

The DB interaction is fixed so I'm sorted (finally).  I hope this
information helps anyone else who is having problems with PDO.

I'd be interested to find out why I need to set this attribute for PDO on
this server? and given that the information at this resource suggests this
is an optimal setting should it always be set?
http://netevil.org/node.php?nid=795&SC=1

Cheers,

Sam
-- 
View this message in context: 
http://www.nabble.com/Zend_Db---setting-PDO-attribute-tf3263396s16154.html#a9072630
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to