mysql - Column alias name not working in order by clause -


i trying use alias name in order clause. gives column not found. how fix ?

it should work when use it, works

select date_id id `td_date` order id 

or use:

select date_id,tot `td_date` order 2 

in case it's ordered 2nd column


Comments