CI_DB_query_builder::group_start PHP Method

group_start() public method

Starts a query group.
public group_start ( string $not = '', string $type = 'AND ' ) : CI_DB_query_builder
$not string (Internal use only)
$type string (Internal use only)
return CI_DB_query_builder
    public function group_start($not = '', $type = 'AND ')
    {
        $type = $this->_group_get_type($type);
        $this->qb_where_group_started = TRUE;
        $prefix = count($this->qb_where) === 0 && count($this->qb_cache_where) === 0 ? '' : $type;
        $where = array('condition' => $prefix . $not . str_repeat(' ', ++$this->qb_where_group_count) . ' (', 'escape' => FALSE);
        $this->qb_where[] = $where;
        if ($this->qb_caching) {
            $this->qb_cache_where[] = $where;
        }
        return $this;
    }