mysql order by two fields
I could solve this on php side, but I would like to use only one query:
I have this rows that represents categories and there list order and
subcategory pathway:
id order pathway
1 7 1
2 0 2
3 9 2/3
4 0 4
5 3 2/3/5
From that data I need to sort them primary by order number and then
pathway to list subcategories inside there catetegory:
id order pathway
4 0 4
2 5 2
3 9 2/3
5 3 2/3/5
1 7 1
No comments:
Post a Comment