Add array of executed queries

This commit is contained in:
Timothy Warren 2012-09-12 13:55:04 +00:00
parent 4c546ed3e9
commit 92c989e6f8
2 changed files with 14 additions and 1 deletions

View File

@ -168,6 +168,17 @@ class Query_Builder {
*/ */
public $conn_name = ""; public $conn_name = "";
/**
* List of sql queries executed
*
* @var array
*/
public $queries;
// --------------------------------------------------------------------------
// ! Methods
// --------------------------------------------------------------------------
/** /**
* Constructor * Constructor
* *
@ -571,7 +582,7 @@ class Query_Builder {
$item = $this->quote_ident($f_array[0]); $item = $this->quote_ident($f_array[0]);
// Simple key value, or an operator // Simple key value, or an operator
$item .= (count($f_array) === 1) ? '= ?' : " {$f_array[1]} ?"; $item .= (count($f_array) === 1) ? '=?' : " {$f_array[1]} ?";
// Put in the query map for select statements // Put in the query map for select statements
$this->having_map[] = array( $this->having_map[] = array(
@ -1396,6 +1407,8 @@ class Query_Builder {
break; break;
} }
$this->queries[] = $sql;
// echo $sql . '<br />'; // echo $sql . '<br />';
return $sql; return $sql;

Binary file not shown.