src/Koldy/Db/Query/Select.php
public function from(string $table, string $alias = null, $field = null): Select
    {
        $this->from[] = [
          'table' => $table,
          'alias' => $alias
        ];

        if ($field !== null) {
            if (is_array($field)) {
                foreach ($field as $fld) {
                    $this->field(($alias ?? $table) . '.' . $fld);
                }
            } else {
                $this->field(($alias ?? $table) . '.' . $field);
            }
        }

        return $this;
    }
public function from(string $table, string $alias = null, $field = null): Select
    {
        $this->from[] = [
          'table' => $table,
          'alias' => $alias
        ];

        if ($field !== null) {
            if (is_array($field)) {
                foreach ($field as $fld) {
                    $this->field(($alias ?? $table) . '.' . $fld);
                }
            } else {
                $this->field(($alias ?? $table) . '.' . $field);
            }
        }

        return $this;
    }
public function from ( string $ table , string $ alias = null , $ field = null ) : Select { $ this -> from [ ] = [ 'table' => $ table , 'alias' => $ alias ] ; if ( $ field !== null ) { if ( is_array ( $ field ) ) { foreach ( $ field as $ fld ) { $ this -> field ( ( $ alias ?? $ table ) . '.' . $ fld ) ; } } else { $ this -> field ( ( $ alias ?? $ table ) . '.' . $ field ) ; } } return $ this ; }
Set the table FROM which fields will be fetched

@param string $table
@param string $alias
@param mixed $field one field as string or more fields as array or just '*'

@return Select
Set the table FROM which fields will be fetched