phprs\ezsql\impls\WhereImpl::where PHP Method

where() public static method

public static where ( $context, $expr, $args )
    public static function where($context, $expr, $args)
    {
        self::condition($context, 'WHERE', $expr, $args);
    }

Usage Example

Example #1
0
 /**
  *
  * where('a=?', 1) => "WHERE a=1"
  * where('a=?', Sql::native('now()')) => "WHERE a=now()"
  * where('a IN (?)',  [1, 2]) => "WHERE a IN (1,2)"
  *
  * @param string $expr
  * @param mixed $_
  * @return \phprs\ezsql\rules\select\GroupByRule
  */
 public function where($expr, $_ = null)
 {
     WhereImpl::where($this->context, $expr, array_slice(func_get_args(), 1));
     return new GroupByRule($this->context);
 }