The purpose of Zend_Db_Statement_Pdo is to provide a Proxy to the PDOStatement, to make Zend_Db usage more consistent with respect to class types and exception types. It was messy that the statement objects returned by PDO adapters versus non-PDO adapters were classes with no common ancestor. Also the exceptions thrown by PDOStatement do not have a common ancestor with the exceptions thrown by non-PDO statements (except for the Exception base class of course). See http://framework.zend.com/issues/browse/ZF-1425
I'm aware that binding of parameters, values, and results is not working currently via the PDO statement proxy. I'm trying to fix it. I believe it has something to do with PHP semantics of passing variables by reference. Regards, Bill Karwin > -----Original Message----- > From: Karol Grecki [mailto:[EMAIL PROTECTED] > Sent: Friday, May 25, 2007 6:40 AM > To: [email protected] > Subject: [fw-general] Zend_Db_Statement_Pdo::bindValue() problem > > > I switched from 9.3 to the latest snapshot > ZendFramework-20070525-4956 Now my code fails on prepared statements. > > Zend_Db_Adapter_Pdo_Abstract::prepare() was changed to return > Zend_Db_Statement_Pdo instead of PDOStatment. > > Now calling bindValue() doesn't seam to have any effect. > I do > $stmt->bindValue('status', 0); > $stmt->execute(); > and I get 'SQLSTATE[HY093]: Invalid parameter number: no > parameters were bound' > > But if I extract PDOStatment object from > Zend_Db_Statement_Pdo and call those 2 methods everything works fine. > > Those methods just delegate the call to PDOStatment and wrap > it in try{} block. Weird. > Anyone else getting this? > > Cheers > Karol > -- > View this message in context: > http://www.nabble.com/Zend_Db_Statement_Pdo%3A%3AbindValue%28% > 29-problem-tf3816200s16154.html#a10803206 > Sent from the Zend Framework mailing list archive at Nabble.com. > >
