* [misc] add addWhere.
This commit is contained in:
@@ -177,6 +177,26 @@ class sqlparser
|
||||
foreach($joins as $join) $this->addJoin($join);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add where.
|
||||
*
|
||||
* @param array|object $wheres
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addWhere($wheres)
|
||||
{
|
||||
if(empty($wheres)) return;
|
||||
|
||||
if($wheres instanceof PhpMyAdmin\SqlParser\Components\Condition)
|
||||
{
|
||||
$this->statement->where[] = $wheres;
|
||||
return;
|
||||
}
|
||||
|
||||
foreach($wheres as $where) $this->addWhere($where);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get function.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user