php - Kohana Database column aliasing, just one or two leaving the rest -


is there way alias column or 2 , leave rest intact using database module.

# taking example $result = db::select(array('longcolumnname1', 'col1'), array('longcolumnname2', 'aliascol2'))->from('table_name')->execute()->current();  # , turning this... '*' $result = db::select(array('longcolumnname1', 'col1'), array('longcolumnname2', '*'))->from('table_name')->execute()->current(); 

my main reason i'm doing left join returns empty, id being overwritten in results , i'd hate have break down every column needed fix result id issue... there easy way... or being lazy...

edit:

$result = db::select('*', array('original_column', 'alias'))->from('table_name')->execute()->current(); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -