public static function buildExtraColumns($columns)
    {
        if (!empty($columns)) {
            if (is_array($columns)) {
                foreach ($columns as $key => $value) {
                    return ', '.$value.' AS '.$key;
                }
            } else {
                return ', ' . $columns;
            }
        }
    }
public static function buildExtraColumns($columns)
    {
        if (!empty($columns)) {
            if (is_array($columns)) {
                foreach ($columns as $key => $value) {
                    return ', '.$value.' AS '.$key;
                }
            } else {
                return ', ' . $columns;
            }
        }
    }
public static function buildExtraColumns ( $ columns ) { if ( ! empty ( $ columns ) ) { if ( is_array ( $ columns ) ) { foreach ( $ columns as $ key => $ value ) { return ', ' . $ value . ' AS ' . $ key ; } } else { return ', ' . $ columns ; } } }
Builds the extra columns you might want to add to a database select query after the initial list of model fields.

@param array|string $columns An array of keys and values or a string which will be added to a list of fields after the query's SELECT clause.
@return string|null Extra columns to add after a SELECT clause in a query. Always starts with a comma.
Builds the extra columns you might want to add to a database select query after the initial list of model fields .