Re: Re: MDB2 best way to get detailed errors back
| From: | brian | Date: | Wed, 19 Jul 2006 17:36:49 +0000 |
| Subject: | Re: Re: MDB2 best way to get detailed errors back | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24704@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
Mark Steudel wrote:Lukas, is there some way to have MDB2 display the resulting SQL query from a failed prepared statement? That is, with the '?'s replaced with the quoted params. regards, brianHi there, I've been switching my apps from DB to mdb2 and I had a little function that I used to spit out the error messages when I did something wrong: ... Before it used to spit out the sql, and now it doesn't, should I access the last_query variable in the mdb2 result? Or is there some better way to do something like this. I just want to see what the sql server is saying.Not really by default. You can tweak your error handling and debugging with a custom debug handler however. Every query and several other methods trigger a debug callback that you can define. There is no detailed documentation of this yet, however I explain it a bit in a blog post of mine, and I am using it inside the SQL generator of LiveUser: http://pooteeweet.org/blog/312