1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/manual/docs/Database operations - Query logging.php
2007-04-13 21:49:11 +00:00

17 lines
284 B
PHP

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