Please help me to see why this sentence works like this.

where = order by order asc.

the tables in my database are originally arranged and read in order

but the order is out of order after adding asc

and do not understand what the author intends

Sql
Mar.04,2021

asc is sorted in ascending order, and you say that it is possible that order is of type varchar.
it is sorted first, then the second and third bits. If it is a numeric type, there is no problem.


asc is arranged in ascending order, which means that the order fields in your database should be int in ascending order according to field order. Check it yourself. When sorting, it is best to add data_format, otherwise it is easy to be out of order.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eafc1b-227f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eafc1b-227f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?