CI_DB_query_builder::select PHP Method

select() public method

Generates the SELECT portion of the query
public select ( $select = '*', $escape = NULL ) : CI_DB_query_builder
return CI_DB_query_builder
    public function select($select = '*', $escape = NULL)
    {
        if (is_string($select)) {
            $select = explode(',', $select);
        }
        // If the escape value was not set, we will base it on the global setting
        is_bool($escape) or $escape = $this->_protect_identifiers;
        foreach ($select as $val) {
            $val = trim($val);
            if ($val !== '') {
                $this->qb_select[] = $val;
                $this->qb_no_escape[] = $escape;
                if ($this->qb_caching === TRUE) {
                    $this->qb_cache_select[] = $val;
                    $this->qb_cache_exists[] = 'select';
                    $this->qb_cache_no_escape[] = $escape;
                }
            }
        }
        return $this;
    }