RE: [PEAR] Re: PEAR:DB get the SQL String
| From: | Lukas Smith | Date: | Sat, 13 Dec 2003 21:38:01 +0000 |
| Subject: | RE: [PEAR] Re: PEAR:DB get the SQL String | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9506@lists.php.net to get a copy of this message | ||
> From: Justin Patrin [mailto:papercrane@reversefold.com]
> Sent: Saturday, December 13, 2003 10:36 PM
> Marco Kundert wrote:
>
> > Hi all
> >
> > First of all im verry new with Pear and i'm surre this is e newbi
> question but i diden't found something in the manual or the archiv.
> >
> > I use the folling code to insert a row:
> >
> > $sth = $db->autoExecute($table_name, $table_fields,
> DB_AUTOQUERY_INSERT);
> >
> > With mysql everything works fine, but with sqlserver driver
> > die ($sth->getMessage());
> > ouput the folling error:
> > DB Error:
> >
> > Thats not mutch. Is there any possibillity to output the genereated SQL
> String from prepare, execute or autoexecute, that would be verry usefully.
> >
> > Thanks Marco
>
> Try ->getUserInfo() as well. If you use both, you'll get all you need.
Aside from the fact that I hate autoExecute maybe you will find some more
information by accessing the last_query property of your DB instance.
Regards,
Lukas