|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Dual Order By?
Simplistic Query:
$query="SELECT * FROM usedcars WHERE list='yes' ORDER BY 'make'"; However I need to have it order by 'model' as well after it's sorted my make. Can MySql do this easily or do I need to hand build a repeating sorter? What I assumed and failed: $query="SELECT * FROM usedcars WHERE list='yes' ORDER BY 'make' ORDER BY 'model'"; Thanks for any suggestions! Last edited by trig : April 11th, 2005 at 10:12 AM. Reason: Didn't change email notification. |
|
#2
|
|||
|
|||
|
Try
Code:
SELECT * FROM usedcars WHERE list = 'yes' ORDER BY make, model And don't put single quotes around column names (you can use backticks, but not quotes). |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Dual Order By? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|