From e2c69d0c84d9e8ea801d532ebe178c58660b6c0b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 15 Aug 2011 22:35:32 -0500 Subject: [PATCH] added query array to db\connection. --- system/db/connection.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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);