Organizational Research By

Surprising Reserch Topic

How to print exact sql query in zend framework ?

Select objects have toString methods in ZendFramework.

from the ZendFramework manual:

$select = $db->select()

$sql = $select->__toString();
echo "$sql\n";

// The output is the string:
//   SELECT * FROM "products"

An alternative solution would be to use the Zend_Db_Profiler. i.e.


// your code
$this->update($up_value,'customer_id ='.$userid.' and address_id <> '.$data['address_Id']);


asked Dec 10, 2013 in PHP by rajesh
0 votes

Related Hot Questions

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.