php-sql-query-builder icon indicating copy to clipboard operation
php-sql-query-builder copied to clipboard

Can you add setWhere function ?

Open hunteryun opened this issue 6 years ago • 0 comments

sorry, my English is poor, and I'm not sure if I knew enough before I asked.

I have a need like this :

` $v = explode(',', $filter['value']);

$where = $query->where()->subWhere("OR");

foreach ($v as $item) {

$where->equals($op_field, $item);

}

$query = $query->setWhere($where);

` so if have a setWhere function , it will very easy :

in NilPortugues\Sql\QueryBuilder\Manipulation\AbstractBaseQuery file add this :

` /** * @return $this */ public function setWhere(Where $where) { $this->where = $where;

    return $this;
}

`

Thanks for your great project.

hunteryun avatar Oct 20 '19 06:10 hunteryun