Pages::setWhere($field[,$operator],$value)
Version 2019.1
Clear where and set new where clause to query
Version 2019.1
Clear where and set new where clause to query
setWhere() uses same parameters as Pages::addWhere() but clears previous where clauses for given field.
$this
Get newest 10 projects that are open and ordered in this month:
$Projects = $this->get('pages','project')
->addWhere('status', 'open')
->addWhere('order_date', 'This month')
->setOrder('order_date','newest')
->setLimit(10);
Instead, get newest 10 that are closed:
$Projects->setWhere('status','closed');