Pages::clearWhere($field)

Version 2019.1

Clear where

clearWhere() clears previous where clauses. If field is given, clear clause only for that field.

Return value

$this

Arguments

$field
Field name to clear

Full documentation

Get newest 10 projects that are open and more valuable than 10000:

$Projects = $this->get('pages','project')
    ->addWhere('status', 'open')
    ->addWhere('order_price', '>', '10000')
    ->setOrder('order_date','newest')
    ->setLimit(10);

Instead, get newest 10 of all that are open:

$Projects->clearWhere('order_price');

Instead, get newest of ALL products:

$Projects->clearWhere();