* [refac] use dbh::$queries instead of dao::$querys.
This commit is contained in:
@@ -3403,7 +3403,7 @@ class baseRouter
|
||||
|
||||
$fh = fopen($sqlLog, 'a');
|
||||
fwrite($fh, date('Ymd H:i:s') . ": " . $this->getURI() . "\n");
|
||||
foreach(dao::$querys as $query) fwrite($fh, " $query\n");
|
||||
foreach(dbh::$queries as $query) fwrite($fh, " $query\n");
|
||||
fwrite($fh, "\n");
|
||||
fclose($fh);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ class dbh
|
||||
|
||||
try
|
||||
{
|
||||
if(class_exists('dao')) dao::$querys[] = "[$this->flag] " . dao::processKeywords($sql);
|
||||
dbh::$queries[] = "[$this->flag] " . dao::processKeywords($sql);
|
||||
return $this->pdo->exec($sql);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
@@ -167,7 +167,7 @@ class dbh
|
||||
$sql = $this->formatSQL($sql);
|
||||
try
|
||||
{
|
||||
if(class_exists('dao')) dao::$querys[] = "[$this->flag] " . dao::processKeywords($sql);
|
||||
dbh::$queries[] = "[$this->flag] " . dao::processKeywords($sql);
|
||||
return $this->pdo->query($sql);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
@@ -234,7 +234,7 @@ class dbh
|
||||
{
|
||||
try
|
||||
{
|
||||
if(class_exists('dao')) dao::$querys[] = "[$this->flag] " . dao::processKeywords($sql);
|
||||
dbh::$queries[] = "[$this->flag] " . dao::processKeywords($sql);
|
||||
return $this->pdo->query($sql);
|
||||
}
|
||||
catch(PDOException $e)
|
||||
|
||||
@@ -43,7 +43,7 @@ class trace
|
||||
'method' => $this->app->server->request_method,
|
||||
'timeUsed' => round(getTime() - $this->app->startTime, 4) * 1000,
|
||||
'memory' => round(memory_get_peak_usage() / 1024, 1),
|
||||
'querys' => count(dao::$querys),
|
||||
'querys' => count(dbh::$queries),
|
||||
'caches' => 0,
|
||||
'files' => count(get_included_files()),
|
||||
'session' => session_id(),
|
||||
@@ -70,7 +70,7 @@ class trace
|
||||
*/
|
||||
public function getRequestSqls()
|
||||
{
|
||||
$this->trace['sqlQuery'] = dao::$querys;
|
||||
$this->trace['sqlQuery'] = dbh::$queries;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -516,7 +516,7 @@ class commonModel extends model
|
||||
{
|
||||
$info['timeUsed'] = round(getTime() - $startTime, 4) * 1000;
|
||||
$info['memory'] = round(memory_get_peak_usage() / 1024, 1);
|
||||
$info['querys'] = count(dao::$querys);
|
||||
$info['querys'] = count(dbh::$queries);
|
||||
vprintf($this->lang->runInfo, $info);
|
||||
return $info;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user