added query array to db\connection.

This commit is contained in:
Taylor Otwell 2011-08-15 22:35:32 -05:00
parent 7225ec0a9e
commit e2c69d0c84
1 changed files with 9 additions and 0 deletions

View File

@ -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);