Link to home
Start Free TrialLog in
Avatar of rnicolais
rnicolais

asked on

How do you use a variable in MySql to establish sort order?

I would like to use a variable from a list to establish a sort order. For example I would like to give the web user the option to sort by either city or zip code. Simply putting the variable name in the 'Order By' statement doesn't appear to work.
Avatar of Cornelia Yoder
Cornelia Yoder
Flag of United States of America image

Seems like it should work.  What happens when you try?
ASKER CERTIFIED SOLUTION
Avatar of virmaior
virmaior
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial