diff --git a/system/db/connection.php b/system/db/connection.php index 459886d5..0e13327a 100644 --- a/system/db/connection.php +++ b/system/db/connection.php @@ -23,6 +23,13 @@ class Connection { */ public $pdo; + /** + * All of the queries that have been executed on the connection. + * + * @var array + */ + public $queries = array(); + /** * Create a new Connection instance. * @@ -66,6 +73,8 @@ public function first($sql, $bindings = array()) */ public function query($sql, $bindings = array()) { + $this->queries[] = $sql; + $query = $this->pdo->prepare($sql); $result = $query->execute($bindings);