src/Builder.php
public function from($table, $selectFields = array('*'))
    {
    	list($tableName, $tableAlias) = $this->tableProcess($table);
        $this->fromTable[$tableAlias] = $tableName;
        if (empty($selectFields)) {
            return $this;
        }
        if ($this->queryType == self::QUERYTYPE_SELECT) {
            $this->fields[$tableAlias] = $this->fieldProcess($tableAlias, $selectFields);
        } else {
            $this->fields[$tableAlias] = $selectFields;
        }
        return $this;
    }
public function from($table, $selectFields = array('*'))
    {
    	list($tableName, $tableAlias) = $this->tableProcess($table);
        $this->fromTable[$tableAlias] = $tableName;
        if (empty($selectFields)) {
            return $this;
        }
        if ($this->queryType == self::QUERYTYPE_SELECT) {
            $this->fields[$tableAlias] = $this->fieldProcess($tableAlias, $selectFields);
        } else {
            $this->fields[$tableAlias] = $selectFields;
        }
        return $this;
    }
public function from ( $ table , $ selectFields = array ( '*' ) ) { list ( $ tableName , $ tableAlias ) = $ this -> tableProcess ( $ table ) ; $ this -> fromTable [ $ tableAlias ] = $ tableName ; if ( empty ( $ selectFields ) ) { return $ this ; } if ( $ this -> queryType == self :: QUERYTYPE_SELECT ) { $ this -> fields [ $ tableAlias ] = $ this -> fieldProcess ( $ tableAlias , $ selectFields ) ; } else { $ this -> fields [ $ tableAlias ] = $ selectFields ; } return $ this ; }
Set from table and select fields
@param mixed $table
@param array $selectFields
@return \Puja\SqlBuilder\Builder
Set from table and select fields