Hi. Something like this will work:
public function dumpSQL()
{
$db = Zend_Db_Table::getDefaultAdapter();
$dbProfiler = $db->getProfiler();
$dbQuery = $dbProfiler->getLastQueryProfile();
$dbSQL = $dbQuery->getQuery();
print_r($dbSQL);
}
Regards,
Narinder.
--
______________________________________________________
| Narinder Chandi, Director,
| ToolBox Systems Limited, Surrey, England, UK.
| tel : +44 (0)1372 720117, mob : +44 (0)7973 512495
| www : http://www.toolbox.uk.com
| Skype : NarinderChandi
| LinkedIn : http://www.linkedin.com/in/toolboxsystems
| Twitter : @ToolBoxSystems
|______________________________________________________
| Consultancy * Development * Support
|______________________________________________________
on 29/03/2010 09:01, Sergio Rinaudo at [email protected] wrote:
>
> Hi everybody,
> if I construct an update query programmatically using Zend_Db, how can I get
> this query and how to get what is the problem if the query fails?
> Thanks
>
> Sergio Rinaudo
>