public function from()
    {
        $from = '';

        $numargs = func_num_args();

        if ($this->oosql_del_multiFlag) {


            if ($numargs < $this->oosql_del_numargs) {
                $msg = 'Columns and passed data do not match! ' . $this->sql();
                throw new \Exception($msg, 9810, null);
            }


        }

        $from .= ' FROM ';

        $from .= $this->oosql_table;

        if ($numargs > 0) {
            $from .= ', ';

            $arg_list = func_get_args();

            for ($i = 0; $i < $numargs; $i++) {
                if ($i !== 0 && $numargs > $i) {
                    $from .= ', ';
                }

                if ($arg_list[$i] instanceof oosql) {

                    $arg_list[$i]->alias();
                    $fields = $arg_list[$i]->getFields($arg_list[$i]->getTableAlias());

                    $this->sql(',' . implode(', ', $fields));
                    $from .= $arg_list[$i]->getSql() . ' AS ' . $arg_list[$i]->getTableAlias();
                } else {
                    $from .= $arg_list[$i];
                }
            }
        }

        $this->sql($from);

        $this->oosql_fromFlag = false;

        return $this;
    }
public function from()
    {
        $from = '';

        $numargs = func_num_args();

        if ($this->oosql_del_multiFlag) {


            if ($numargs < $this->oosql_del_numargs) {
                $msg = 'Columns and passed data do not match! ' . $this->sql();
                throw new \Exception($msg, 9810, null);
            }


        }

        $from .= ' FROM ';

        $from .= $this->oosql_table;

        if ($numargs > 0) {
            $from .= ', ';

            $arg_list = func_get_args();

            for ($i = 0; $i < $numargs; $i++) {
                if ($i !== 0 && $numargs > $i) {
                    $from .= ', ';
                }

                if ($arg_list[$i] instanceof oosql) {

                    $arg_list[$i]->alias();
                    $fields = $arg_list[$i]->getFields($arg_list[$i]->getTableAlias());

                    $this->sql(',' . implode(', ', $fields));
                    $from .= $arg_list[$i]->getSql() . ' AS ' . $arg_list[$i]->getTableAlias();
                } else {
                    $from .= $arg_list[$i];
                }
            }
        }

        $this->sql($from);

        $this->oosql_fromFlag = false;

        return $this;
    }
public function from ( ) { $ from = '' ; $ numargs = func_num_args ( ) ; if ( $ this -> oosql_del_multiFlag ) { if ( $ numargs < $ this -> oosql_del_numargs ) { $ msg = 'Columns and passed data do not match! ' . $ this -> sql ( ) ; throw new \ Exception ( $ msg , 9810 , null ) ; } } $ from .= ' FROM ' ; $ from .= $ this -> oosql_table ; if ( $ numargs > 0 ) { $ from .= ', ' ; $ arg_list = func_get_args ( ) ; for ( $ i = 0 ; $ i < $ numargs ; $ i ++ ) { if ( $ i !== 0 && $ numargs > $ i ) { $ from .= ', ' ; } if ( $ arg_list [ $ i ] instanceof oosql ) { $ arg_list [ $ i ] -> alias ( ) ; $ fields = $ arg_list [ $ i ] -> getFields ( $ arg_list [ $ i ] -> getTableAlias ( ) ) ; $ this -> sql ( ',' . implode ( ', ' , $ fields ) ) ; $ from .= $ arg_list [ $ i ] -> getSql ( ) . ' AS ' . $ arg_list [ $ i ] -> getTableAlias ( ) ; } else { $ from .= $ arg_list [ $ i ] ; } } } $ this -> sql ( $ from ) ; $ this -> oosql_fromFlag = false ; return $ this ; }
Assembles the FROM part of the query
@throws \Exception
@return \Phiber\oosql\oosql Instance
Assembles the FROM part of the query