src/xPDO/Om/xPDOQuery.php
public function select($columns= '*') {
        if (!is_array($columns)) {
            $columns= trim($columns);
            if ($columns == '*' || $columns === $this->_alias . '.*' || $columns === $this->xpdo->escape($this->_alias) . '.*') {
                $columns= $this->xpdo->getSelectColumns($this->_class, $this->_alias, $this->_alias . '_');
            }
            $columns= explode(',', $columns);
            foreach ($columns as $colKey => $column) $columns[$colKey] = trim($column);
        }
        if (is_array ($columns)) {
            if (!is_array($this->query['columns'])) {
                $this->query['columns']= $columns;
            } else {
                $this->query['columns']= array_merge($this->query['columns'], $columns);
            }
        }
        return $this;
    }
public function select($columns= '*') {
        if (!is_array($columns)) {
            $columns= trim($columns);
            if ($columns == '*' || $columns === $this->_alias . '.*' || $columns === $this->xpdo->escape($this->_alias) . '.*') {
                $columns= $this->xpdo->getSelectColumns($this->_class, $this->_alias, $this->_alias . '_');
            }
            $columns= explode(',', $columns);
            foreach ($columns as $colKey => $column) $columns[$colKey] = trim($column);
        }
        if (is_array ($columns)) {
            if (!is_array($this->query['columns'])) {
                $this->query['columns']= $columns;
            } else {
                $this->query['columns']= array_merge($this->query['columns'], $columns);
            }
        }
        return $this;
    }
public function select ( $ columns = '*' ) { if ( ! is_array ( $ columns ) ) { $ columns = trim ( $ columns ) ; if ( $ columns == '*' || $ columns === $ this -> _alias . '.*' || $ columns === $ this -> xpdo -> escape ( $ this -> _alias ) . '.*' ) { $ columns = $ this -> xpdo -> getSelectColumns ( $ this -> _class , $ this -> _alias , $ this -> _alias . '_' ) ; } $ columns = explode ( ',' , $ columns ) ; foreach ( $ columns as $ colKey => $ column ) $ columns [ $ colKey ] = trim ( $ column ) ; } if ( is_array ( $ columns ) ) { if ( ! is_array ( $ this -> query [ 'columns' ] ) ) { $ this -> query [ 'columns' ] = $ columns ; } else { $ this -> query [ 'columns' ] = array_merge ( $ this -> query [ 'columns' ] , $ columns ) ; } } return $ this ; }
Specify columns to return from the SQL query.

@param string $columns Columns to return from the query.
@return xPDOQuery Returns the current object for convenience.
Specify columns to return from the SQL query .