Studyon Minte9.com
ZF 1.0

Study

Last query



Get last query, including the values

$db = Zend_Registry::get('dbAdapter');
$db->getProfiler()->setEnabled(true);

$lastQuery = $db->getProfiler()->getLastQueryProfile()->getQuery();
	// SELECT * FROM ...

// to examine the sql, like $db->update(...)
$lastQueryParams = $db->getProfiler()->getLastQueryProfile()->getQueryParams();


http://framework.zend.com/manual/en/zend.db.profiler.html
http://stackoverflow.com/questions/1009639/zend-db-framework-examine-query-for-an-update