Yes, ok for the try-catch to get exceptions and to echo a select query, 
but if I want to get the update query string?


Sergio Rinaudo




> Date: Mon, 29 Mar 2010 11:13:04 +0300
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: [fw-general] Get query and error messages from $db->update
> 
> If you form the query in the following way
> $filter = $this->select()->from($this->_name, array('id', 'label'));
> then you can echo it directly
> echo $filter;
> 
> And if there is a db/sql syntax error, it already throws exception.
> For example, let's say you do not have a field named "idd" in your
> table structure
> $filter = $this->select()->from($this->_name, array('idd', 'label'));
> Then the above sql statement will throw an exception telling you that
> there is no field with name idd in the related table..
> 
> scs
> 
> On Mon, Mar 29, 2010 at 11:01 AM, Sergio Rinaudo
> <[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
> >
> >
> >
> > ________________________________
> > Vuoi scaricare gli allegati? Guardali in anteprima, su Hotmail!
                                          
_________________________________________________________________
Scatta, ritocca e condividi le tue foto online. Gratis per te
http://www.windowslive.it/foto.aspx

Reply via email to