Remote Working: One Does Not Simply Spend a Year Without Pants
lucasartoni.com2 pointsby mikzael0 comments
head in <?php echo number_format($head_microttime, 4); ?> s
body in <?php echo number_format(microtime(true) - $starttime, 4); ?> s
<?php echo count($database->run_queries); ?> queries
<?php if (DEBUG) print_r($database->run_queries); ?>
--> head in 0.3452 s
body in 0.7256 s
32 queries
Array(
[/Volumes/data/Sites/najnehnutelnosti/framework/initialize.php25] => SELECT name,value FROM settings
[/Volumes/data/Sites/najnehnutelnosti/framework/initialize.php45] => SELECT * FROM mod_captcha_control LIMIT 1
[/Volumes/data/Sites/najnehnutelnosti/framework/class.frontend.php123] => SELECT * FROM pages WHERE page_id = '1'
[/Volumes/data/Sites/najnehnutelnosti/framework/class.wb.php96] => SELECT publ_start,publ_end FROM sections WHERE page_id = '1'
[/Volumes/data/Sites/najnehnutelnosti/framework/frontend.functions.php28] => SELECT directory FROM addons WHERE type = 'module' AND function = 'snippet'
...etc
)
--> function query($statement) {
$mysql = new mysql();
$mysql->query($statement);
$backtrace = debug_backtrace();
$this->run_queries[$backtrace[0]['file'].$backtrace[0]['line']] = $statement;
$this->set_error($mysql->error());
if($mysql->error()) {
return null;
} else {
return $mysql;
}
}