Currently the exceptions do not provide the SQL string as part of their content.
We have this as a feature request to develop at a later date. http://framework.zend.com/issues/browse/ZF-1399 In the meantime, another solution might be to enable the Zend_Db_Profiler. It can tell you the SQL statement that was executed. However, you would need to enable the profiler before running the query. $db->getProfiler()->setEnabled(true); try { $db->update(...); } catch (Zend_Db_Exception $e) { $p = $db->getProfiler()->getLastQueryProfile(); $sql = $p->getQuery(); echo "Problem in query: $sql\n"; } Regards, Bill Karwin > -----Original Message----- > From: Кононов Руслан [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 26, 2007 12:22 AM > To: Zend Framework > Subject: [fw-general] how get query from Zend_Db in Exception > > How can I get sql query from Zend_DB using update (), delete > (), insert > () in the case of Exception ? >
