2008年8月22日星期五

Re: [fw-db] DB Profiler

in your db profiler, you can call $query->getQueryParams() to get the
values that were sent for the prepared statement.

foreach ($queryProfiles as $query) {
$logger->info("\nQuery:\n" . $query->getQuery() .
"\nParameters: " . var_export($query->getQueryParams(), true) .
"\nExecution time: " . $query->getElapsedSecs() . ' seconds');
if ($query->getElapsedSecs() > $longestTime) {
$longestTime = $query->getElapsedSecs();
$longestQuery = $query->getQuery();
}
}

monk.e.boy wrote:
> How do I extract the actual SQL that was passed to the DB? I want to see how
> my variables have been inserted (I also want to copy the SQL and run it in
> my MySQLyog)
>
> thanks
>
> monk.e.boy
>
> http://teethgrinder.co.uk/open-flash-chart/ <-- open source charts
>

没有评论: