Page 1 of 1

[SOLVED]Referencing columns by number not name

Posted: Mon Oct 17, 2005 10:21 am
by Skittlewidth
Quick question:

If you want to write a select statement for a table you don't know the column names for, how do you format the statement so that you use the column numbers, as you could with an array? The manual was a bit vague. So instead of writing

Code: Select all

select * from tablename order by id
it would be more like

Code: Select all

select * from tablename order by 0
Thanks

Posted: Mon Oct 17, 2005 10:27 am
by Skittlewidth
ah the column numbers start at 1 not zero....