Answer the question
In order to leave comments, you need to log in
Change ORDER BY logic?
Kind.
There is a query like this
SELECT * FROM product WHERE product .product_category = '2' ORDER BY product_subgroup
The problem is that product_subgroup is a character (A,B,C, etc.). Everything would suit, but there is a record A-, which should be ahead of A. That's the question - are there any options for how to change the sorting logic, I really don't want to enter another field in the table
Answer the question
In order to leave comments, you need to log in
Is that how it works?
SELECT * FROM product
WHERE product .product_category = '2'
ORDER BY (product_subgroup='A'), product_subgroup
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question