Re: DB_DataObject - SQL statement
| From: | Luca Giandoso | Date: | Tue, 05 Jun 2007 10:04:02 +0000 |
| Subject: | Re: DB_DataObject - SQL statement | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27415@lists.php.net to get a copy of this message | ||
Try with
$person->getDatabaseConnection()->last_query;
Hope this helps.
Luca Giandoso
On 6/5/07, David Sanders <dsanders@baselinesolutions.com.au> wrote:
I know at least with old DB, you could fetch the last query executed... you'll
have to look it up in the manual though I can't remember it ;)
Rodrigo Elias wrote:
Hi there!
Well, i have one question about DB_DataObject. Its possible to get the
SQL statement that has been used on an query?
Example:
$person = &DB_DataObject::factory('person');
$num_rows = $person->get($id);
How can i proceed to get the: "select * from person where id = 1".
Thanks in advance!
Rods
--
David Sanders
shangxiao
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php