Set select from.

@return $this
14883
private function setSelectFrom()
    {
        foreach ($this->selectColumns as $key => $value) {
            $this->qb->addSelect($key);
        }

        $this->qb->from($this->entity, $this->tableName);

        return $this;
    }
841372
public function setInactive() {
		if ($this->_active) {
			$this->removeClass(self::CLASS_ACTIVE);
			$this->_active = false;
		}
		
		return $this;
	}
345606
public function setInactiveAll() {
		foreach ($this->getElements() as $element) {
			if ($element instanceof Element) {
				$element->setInactive();
			}
		}
		
		return $this;
	}
1188232
public function select($fields)
    {
        if (!is_array($fields)) {
            $fields = func_get_args();
        }

        $fields = $this->addTablePrefix($fields);
        $this->addStatement('selects', $fields);
        return $this;
    }
651222
public function select(Select $select, ResultSet\ResultSetInterface $resultSet = null)
    {
        $stmt = $this->getSql()->prepareStatementForSqlObject($select);

        $resultSet = $resultSet ?: new ResultSet\ResultSet(ResultSet\ResultSet::TYPE_ARRAY);
        $resultSet->initialize($stmt->execute());

        return $resultSet;
    }
1192471
public function select($select = '*')
    {
        //Argument 1 must be a string or array
        Argument::i()->test(1, 'string', 'array');
        
        //if select is an array
        if (is_array($select)) {
            //transform into a string
            $select = implode(', ', $select);
        }
        
        $this->select = $select;
        
        return $this;
    }
812875
public function setSelectionModel(string $selection) : self
    {
        $this->selectionModel = $selection;

        $this->thead->add((new HtmlElement('<th>'))
            ->addClass('selection')
        );

        return $this;
    }
598407
public function selectWith(\Zend\Db\Sql\Select $select)
    {
        if ($this->usePaginator === true) {
            return $this->initPaginator($select);
        }

        $this->result = $this->tableGateway->selectWith($select);

        return $this->result;
    }
72641
protected function setWhere()
    {
        $foreign = $this->getForeignKey();

        $parentKey = $this->parentMap->getKeyName();

        $this->query->where($foreign, '=', $this->parent->getEntityAttribute($parentKey));

        return $this;
    }
207389
protected function _getSelectFieldsAndTable()
    {
        $template = "SELECT %s FROM %s";
        if ($this->_sql->isDistinct()) {
            $template = "SELECT DISTINCT %s FROM %s";
        }
        $this->_statement = sprintf(
            $template,
            $this->_getFieldList(),
            $this->_sql->getTable()
        );
        return $this;
    }
154699
public function buildQuery()
    {
        $this->setSelectFrom();
        $this->setLeftJoins($this->qb);
        $this->setWhere($this->qb);
        $this->setWhereResultCallback($this->qb);
        $this->setWhereAllCallback($this->qb);
        $this->setOrderBy();
        $this->setLimit();

        return $this;
    }
1132457
public function addSelect($select)
    {
        if (null === $select) {
            return $this;
        }
        if (is_array($select)) {
            $t = [];
            foreach ($select as $field => $alias) {
                if (is_int($field)) {
                    $alias = $this->quoteColumnName($alias);
                    array_push($t, "{$alias}");
                } else {
                    $field = $this->quoteColumnName($field);
                    $alias = $this->quoteColumnName($alias);
                    array_push($t, "{$field} AS {$alias}");
                }
            }
            $select = implode(',', $t);
        }
        if (isset($this->query['select']) && !empty($this->query['select'])) {
            $select = "{$this->query['select']},{$select}";
        }
        $this->query['select'] = $select;
        return $this;
    }
900384
public function select($columns)
  {
    $this->type = 'select';

    if ( is_null($this->select) ){
      $this->select = new Element('SELECT', $columns);
    }
    else {
      $this->select->append($columns);
    }

    return $this;
  }
286658
private function setColumns()
    {
        $this->datatableQuery->setSelectColumns($this->selectColumns);
        $this->datatableQuery->setAllColumns($this->allColumns);
        $this->datatableQuery->setJoins($this->joins);
        $this->datatableQuery->setSearchColumns($this->searchColumns);
        $this->datatableQuery->setOrderColumns($this->orderColumns);

        return $this;
    }
817664
public function updateSelectQuery($select)
    {
        $p = null;
        if (!empty($this->owner->relations)) {
            $p = $this->owner->table_alias ?: $this->owner->table;
        }

        if ($this->relation) {
            $select->field($this->actual_field ?: $this->short_name, $this->relation->short_name, $this->short_name);
        } elseif (!(is_null($this->actual_field)) && $this->actual_field != $this->short_name) {
            $select->field($this->actual_field, $p, $this->short_name);

            return $this;
        } else {
            $select->field($this->short_name, $p);
        }

        return $this;
    }
1115206
public function select($columns = '*') 
    {
        $this->sql = 'SELECT ';
        
        if(is_array($columns)) {
            foreach($columns as $column) {
                $this->sql .= $this->quoteColumnName($column) . ', ';
            }
            
            $this->sql = trim($this->sql, ', ') . ' ';
        } else {
            $this->sql .= '* ';
        }
        
        return $this;
    }
352757
public function from($from = NULL) {
		if ($from !== NULL) {
			$from = intval($from);
		}

		$this->from = intval($from);
		return $this;
	}