php - double sort troubles
黄舟
黄舟 2017-05-16 13:11:09
0
2
491

Suppose there are two fields in the user table, one is the number of questions num, and the other is the time. Now we need to sort by num first, and then sort the same num by time.
For example (num has three numbers, 5, 7, 5, and then sorted by nun to get 5, 5, 7, but is there any way to sort the same two 5 and 5 by tine separately)

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
伊谢尔伦

order by num desc,time desc Isn’t this easy to do?

漂亮男人

Database query can be solved by SQL. If it is only implemented in PHP, you can take a look at thisarray_multisort

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template