I have a mysql table with products.
The products have a category ID and a name.
What I'd like to do is order by category id first descending order and then order by product name ascending order.
SELECT * FROM `products` ORDER BY `products`.`product_category_id`,`naam` DESC
What i'd like is
SELECT * FROM `products` ORDER BY `products`.`product_category_id`,`naam` DESC,ASC
but that unfortunately doesn't work.
Is this even possible in mysql to define the sorting order of the second sorting column?
question from:
https://stackoverflow.com/questions/13468781/mysql-order-by-both-ascending-and-descending-sorting 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…