2008年7月30日星期三

Re: [fw-db] SQL debug please

Bill Karwin wrote:
>
>
> You may have to fetch "unfinished" query profiles. This feature never got
> documented. Here's how to use it:
>
> $db->getProfiler()->setEnabled(true);
> try {
> // ...execute broken SQL statement...
> } catch (Zend_Db_Exception $e) {
> foreach ($db->getProfiler()->getQueryProfiles(null, true) as $prof) {
> print $prof->getQuery() . "\n";
> }
> }
>
> The first argument to getQueryProfiles() is for the query type (or null
> for all types). The second argument is a boolean which defaults to false.
> If it's true, the function includes unfinished queries as well as finished
> queries in the array returned.
>
> Regards,
> Bill Karwin
>

Perfect! Thanks :-)

monk.e.boy

--
View this message in context: http://www.nabble.com/SQL-debug-please-tp18728846p18736941.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: