protected function _extractColumnsFromSelectQuery()
    {
        $_query = $this->getSelectQuery();
        $_matches = array();

        $_pattern = '#.*(SELECT)(.*)(FROM|LEFT|JOIN)#ims';
        preg_match($_pattern, $_query, $_matches);

        $_columnsList = explode(',', $_matches[2]);

        array_walk($_columnsList, function (&$value, $index) {
            $value = trim($value);
        });

        return $_columnsList;
    }
protected function _extractColumnsFromSelectQuery()
    {
        $_query = $this->getSelectQuery();
        $_matches = array();

        $_pattern = '#.*(SELECT)(.*)(FROM|LEFT|JOIN)#ims';
        preg_match($_pattern, $_query, $_matches);

        $_columnsList = explode(',', $_matches[2]);

        array_walk($_columnsList, function (&$value, $index) {
            $value = trim($value);
        });

        return $_columnsList;
    }
protected function _extractColumnsFromSelectQuery ( ) { $ _query = $ this -> getSelectQuery ( ) ; $ _matches = array ( ) ; $ _pattern = '#.*(SELECT)(.*)(FROM|LEFT|JOIN)#ims' ; preg_match ( $ _pattern , $ _query , $ _matches ) ; $ _columnsList = explode ( ',' , $ _matches [ 2 ] ) ; array_walk ( $ _columnsList , function ( & $ value , $ index ) { $ value = trim ( $ value ) ; } ) ; return $ _columnsList ; }
Extract the list of columns from Select Query
@return string[] The list of columns
Extract the list of columns from Select Query