tags:

views:

23

answers:

3

how i can use multiple sorting in mysql

ORDER BY PARAM1 , PARAM2

or

ORDER BY PARAM1 AND PARAM2 AND PARAM3 DESC

what is write way to sorting in mysql

+1  A: 

The first one is correct.

spbfox
+1  A: 

From Mysql Select Syntax you can see that that the correct syntax for using ORDER BY is:

[ORDER BY {col_name | expr | position}
[ASC | DESC], ...]
            ^
comma separated

So your first option is correct.

codaddict
A: 

ORDER BY field1, field2, ...

vulkanino