Nette\Database\Table\Selection::where PHP Метод

where() публичный Метод

Adds where condition, more calls appends with AND.
public where ( $condition, $params ) : self
Результат self
    public function where($condition, ...$params)
    {
        $this->condition($condition, $params);
        return $this;
    }

Usage Example

Пример #1
0
 /**
  * Filter data
  * @param array $filter
  */
 public function filter(array $filter)
 {
     foreach ($filter as $key => $value) {
         $value = is_numeric($value) ? $value : '%' . $value . '%';
         $this->table->where($key . ' LIKE ?', $value);
     }
 }
All Usage Examples Of Nette\Database\Table\Selection::where