PHP Class phprs\ezsql\rules\select\WhereRule

Inheritance: extends GroupByRule
Show file Open project: caoym/phprs-restful

Public Methods

Method Description
where ( string $expr, mixed $_ = null ) : GroupByRule where('a=?', 1) => "WHERE a=1" where('a=?', Sql::native('now()')) => "WHERE a=now()" where('a IN (?)', [1, 2]) => "WHERE a IN (1,2)"
whereArgs ( array $args ) whereArgs([ 'a'=>1, 'b'=>['IN'=>[1,2]] 'c'=>['BETWEEN'=>[1,2]] 'd'=>['<>'=>1] ])

Method Details

where() public method

where('a=?', 1) => "WHERE a=1" where('a=?', Sql::native('now()')) => "WHERE a=now()" where('a IN (?)', [1, 2]) => "WHERE a IN (1,2)"
public where ( string $expr, mixed $_ = null ) : GroupByRule
$expr string
$_ mixed
return GroupByRule

whereArgs() public method

=> "WHERE a=1 AND b IN(1,2) AND c BETWEEN 1 AND 2 AND d<>1"
public whereArgs ( array $args )
$args array