Re: Re: Database show query by ->execute
| From: | Martin Klaffenboeck | Date: | Wed, 29 Jun 2005 16:25:45 +0000 |
| Subject: | Re: Re: Database show query by ->execute | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19823@lists.php.net to get a copy of this message | ||
Am Mittwoch, den 29.06.2005, 09:16 -0400 schrieb Matthew Weier
O'Phinney:
> * Martin Klaffenboeck <martin.klaffenboeck@gmx.at>:
> > Is it possible to show the query while execute it? For my debugging
> > purposes (query doesn't match the right things) I would like to enable
> > something to see the resulting query by executing a prepared query.
> >
> > How can I do this?
>
> AFTER the query has run, you can see what was run by grabbing the
> $db->last_query property:
>
> $db->query($sql, $params);
> echo $db->last_query;
Thanks, thats great!
Martin