public function getColumnsAsSQL($tableAlias = '', $columnPrefix = '')
    {
        if (empty($this->mapping)) {
            return '*';
        }

        $output = '';
        foreach ($this->mapping as $column => $mappingField) {
            if (!empty($output)) {
                $output .= ',';
            }

            if (!empty($tableAlias)) {
                $output .= '`' . $tableAlias . '`.';
            }

            $output .= '`' . $column . '`';

            if (!empty($columnPrefix)) {
                $output .= ' as `' . $columnPrefix . $column . '`';
            }
        }

        return $output;
    }
public function getColumnsAsSQL($tableAlias = '', $columnPrefix = '')
    {
        if (empty($this->mapping)) {
            return '*';
        }

        $output = '';
        foreach ($this->mapping as $column => $mappingField) {
            if (!empty($output)) {
                $output .= ',';
            }

            if (!empty($tableAlias)) {
                $output .= '`' . $tableAlias . '`.';
            }

            $output .= '`' . $column . '`';

            if (!empty($columnPrefix)) {
                $output .= ' as `' . $columnPrefix . $column . '`';
            }
        }

        return $output;
    }
public function getColumnsAsSQL ( $ tableAlias = '' , $ columnPrefix = '' ) { if ( empty ( $ this -> mapping ) ) { return '*' ; } $ output = '' ; foreach ( $ this -> mapping as $ column => $ mappingField ) { if ( ! empty ( $ output ) ) { $ output .= ',' ; } if ( ! empty ( $ tableAlias ) ) { $ output .= '`' . $ tableAlias . '`.' ; } $ output .= '`' . $ column . '`' ; if ( ! empty ( $ columnPrefix ) ) { $ output .= ' as `' . $ columnPrefix . $ column . '`' ; } } return $ output ; }
Get raw columns as SQL, with some prefix options

@param string $tableAlias
@param string $columnPrefix
@return string
Get raw columns as SQL with some prefix options