I have a select statement like this:
$select1 = $sql->select('table1');
$select1->columns('col1', 'col2', 'col3');
$select1->join('table2', 'table1.id = table2.id', array('col4', 'col5'));
$select1->join('table3', 'table2.id2 = table3.id2', array('col6', 'col7'));
My select statement shows columns in this order: col1, col2, col3, col4, col5, col6, col7.
I want to show columns in any other order, for example: col7, col6, col1, col2, col3, col4, col5.
How can I do that without changing my FROM
statement and the order of the joins? I need something like specify the columns in just one $select1->columns()
so I can set any columns order I want.