diff --git a/inc/AwlQuery.php b/inc/AwlQuery.php index 70c078ec..7b3586c6 100644 --- a/inc/AwlQuery.php +++ b/inc/AwlQuery.php @@ -235,12 +235,14 @@ class AwlQuery else $this->connection = null; $argc = func_num_args(); + $args = func_get_args(); - $this->querystring = func_get_arg(0); + $this->querystring = array_shift($args); if ( 1 < $argc ) { - $args = func_get_args(); - array_shift($args); - $this->Bind($args); + if ( is_array($args[0]) ) + $this->Bind($args[0]); + else + $this->Bind($args); } return $this; @@ -332,6 +334,22 @@ class AwlQuery } + /** + * Return the query string we are planning to execute + */ + function QueryString() { + return $this->querystring; + } + + + /** + * Return the parameters we are planning to substitute into the query string + */ + function Parameters() { + return $this->bound_parameters; + } + + /** * Execute the query, logging any debugging. *