PHP Class phprs\ezsql\rules\select\HavingRule

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

Public Methods

Method Description
having ( string $expr, string $_ = null ) : OrderByRule having('SUM(a)=?', 1) => "HAVING SUM(a)=1" having('a>?', Sql::native('now()')) => "HAVING a>now()" having('a IN (?)', [1, 2]) => "HAVING a IN (1,2)"
havingArgs ( array $args ) : OrderByRule havingArgs([ 'a'=>1, 'b'=>['IN'=>[1,2]] 'c'=>['BETWEEN'=>[1,2]] 'd'=>['<>'=>1] ])

Method Details

having() public method

having('SUM(a)=?', 1) => "HAVING SUM(a)=1" having('a>?', Sql::native('now()')) => "HAVING a>now()" having('a IN (?)', [1, 2]) => "HAVING a IN (1,2)"
public having ( string $expr, string $_ = null ) : OrderByRule
$expr string
$_ string
return OrderByRule

havingArgs() public method

=> "HAVING a=1 AND b IN(1,2) AND c BETWEEN 1 AND 2 AND d<>1"
public havingArgs ( array $args ) : OrderByRule
$args array
return OrderByRule