PHP MySQL Order By Makes Incorrect Sorting

We get this error when your column type is "string". If you make the column type column_Name to int, "order by" will work correctly.

If you want to handle the situation without changing it, you can try it like this.

SELECT * FROM news ORDER BY new_number + 0 ASC

 

Comments

There are no comments, make the firs comment