mirror of
https://github.com/slawkens/myaac.git
synced 2025-12-03 08:06:50 +01:00
Log PDO queries, as stated in docs, but doesn't work yet (don't know the reason)
This commit is contained in:
@@ -372,6 +372,10 @@ class POT
|
|||||||
|
|
||||||
$this->db = new OTS_DB_MySQL($params);
|
$this->db = new OTS_DB_MySQL($params);
|
||||||
|
|
||||||
|
global $debugBar;
|
||||||
|
$pdo = new DebugBar\DataCollector\PDO\TraceablePDO($this->db);
|
||||||
|
$debugBar->addCollector(new DebugBar\DataCollector\PDO\PDOCollector($pdo));
|
||||||
|
|
||||||
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user