id product_cat_id product_type_id ordering
1 1 1 1
2 2 3 1
3 1 2 1
4 1 1 2
5 3 1 1
我想按照product_cat_id的順序,然後從訂購欄中輸入product_type_id。輸出應該是這樣的:sql訂購colums查詢
id product_cat_id product_type_id ordering
1 1 1 1
4 1 1 2
3 1 2 1
2 2 3 1
5 3 1 1
這真是基本的sql。你花了超過2秒研究這個? – regality
我做了,但我想不出如何分階段我的谷歌搜索,這就是爲什麼我不得不舉一個堆棧溢出的例子。這個問題真的值得大拇指嗎? – milan