Hi there,
Now I've read the ORDER BY section of the mysql documentation, but still have no clue, what strategy I have to follow now.
The problem is that I want to query the DB like:
[CODE=mysql]SELECT * FROM tr WHERE report_id='a408 58a6-d286-9d34-1ada-47e116c72699' ORDER BY pr DESC,loc DESC,DMZ DESC,url ASC,os ASC [/CODE]
But after the second ORDER BY statement every other ORDER BY statement is being ignored. My primary keys are report_id,keywo rd and url.
The table itself is not immense big (300 records) and my only index is report_id.
Whats the clue? I can load everything in a php array and use array_sort on each column or maybe I can use other mysql tricks but I want to do it right and cant figure out why MySql is bugging us with this...?
Any ideas? Tnx...
Now I've read the ORDER BY section of the mysql documentation, but still have no clue, what strategy I have to follow now.
The problem is that I want to query the DB like:
[CODE=mysql]SELECT * FROM tr WHERE report_id='a408 58a6-d286-9d34-1ada-47e116c72699' ORDER BY pr DESC,loc DESC,DMZ DESC,url ASC,os ASC [/CODE]
But after the second ORDER BY statement every other ORDER BY statement is being ignored. My primary keys are report_id,keywo rd and url.
The table itself is not immense big (300 records) and my only index is report_id.
Whats the clue? I can load everything in a php array and use array_sort on each column or maybe I can use other mysql tricks but I want to do it right and cant figure out why MySql is bugging us with this...?
Any ideas? Tnx...
Comment