Commit 08bcedf0 by Qiang Xue

...

parent c63c7838
......@@ -203,7 +203,7 @@ class Command extends \yii\base\Component
*/
public function bindValues($values)
{
if ($values !== array()) {
if (!empty($values)) {
$this->prepare();
foreach ($values as $name => $value) {
$this->pdoStatement->bindValue($name, $value, $this->connection->getPdoType(gettype($value)));
......
......@@ -46,6 +46,10 @@ class QueryBuilder extends \yii\base\Object
*/
public function build($query)
{
if ($this->operation !== null) {
$method = array_shift($this->operation);
return call_user_func_array(array($this, $method), $this->operation);
}
$clauses = array(
$this->buildSelect($query),
$this->buildFrom($query),
......
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