MysqliDb::having PHP Method

having() public method

This method allows you to specify multiple (method chaining optional) AND HAVING statements for SQL queries.
public having ( string $havingProp, mixed $havingValue = 'DBNULL', string $operator = '=', $cond = 'AND' ) : MysqliDb
$havingProp string The name of the database field.
$havingValue mixed The value of the database field.
$operator string Comparison operator. Default is =
return MysqliDb
    public function having($havingProp, $havingValue = 'DBNULL', $operator = '=', $cond = 'AND')
    {
        // forkaround for an old operation api
        if (is_array($havingValue) && ($key = key($havingValue)) != "0") {
            $operator = $key;
            $havingValue = $havingValue[$key];
        }
        if (count($this->_having) == 0) {
            $cond = '';
        }
        $this->_having[] = array($cond, $havingProp, $operator, $havingValue);
        return $this;
    }