* [misc] add addWhere.

This commit is contained in:
qixinzhi
2024-09-04 16:10:43 +08:00
committed by 代婷婷
parent fb13052f4d
commit 763143d3c3
+20
View File
@@ -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.
*