1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/manual/codes/Database operations - Query logging.php

16 lines
281 B
PHP
Raw Normal View History

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