added query array to db\connection.
This commit is contained in:
parent
7225ec0a9e
commit
e2c69d0c84
|
@ -23,6 +23,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.
|
||||||
*
|
*
|
||||||
|
@ -66,6 +73,8 @@ public function first($sql, $bindings = array())
|
||||||
*/
|
*/
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue