Commit e2c69d0c by Taylor Otwell

added query array to db\connection.

parent 7225ec0a
...@@ -24,6 +24,13 @@ class Connection { ...@@ -24,6 +24,13 @@ class Connection {
public $pdo; public $pdo;
/** /**
* All of the queries that have been executed on the connection.
*
* @var array
*/
public $queries = array();
/**
* Create a new Connection instance. * Create a new Connection instance.
* *
* @param string $name * @param string $name
...@@ -66,6 +73,8 @@ class Connection { ...@@ -66,6 +73,8 @@ class Connection {
*/ */
public function query($sql, $bindings = array()) public function query($sql, $bindings = array())
{ {
$this->queries[] = $sql;
$query = $this->pdo->prepare($sql); $query = $this->pdo->prepare($sql);
$result = $query->execute($bindings); $result = $query->execute($bindings);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment