1
0
mirror of synced 2025-02-06 15:29:26 +03:00
doctrine2/manual/docs/Database operations - Query logging.php

17 lines
299 B
PHP
Raw Normal View History

<code type="php">
2006-07-23 21:08:06 +00:00
// works only if you use doctrine database handler
$dbh = $conn->getDBH();
2006-07-23 21:08:06 +00:00
$times = $dbh->getExecTimes();
// print all executed queries and their execution times
foreach($dbh->getQueries() as $index => $query) {
print $query." ".$times[$index];
}
</code>