php - SQL Order by ... ASC -
I have problems with SQL queries. I want to sort my results in ascending order, but the problem is that DB According to the first data, the results give, whereas logically, 2 should be before 19 for example.
Here is my request and a screenshot of the result which does not go at all:
SELECT * by mail 'WHOER' as the title '% $ MT%' ORDER BY mail. Titre asc
< P> All the results have been solved what I want: 1 2 3 4 5 ... 101 102 103 ... 8845 8850 ... and so on.
Do you have an idea of this problem?
Regards.
I think the column is deprecated because char
. Therefore, the DBMS string value is being sorted by. You have to convert your values to int in the ordered segment.
SELECT * By typing '% $ MT' 'by order and convert (mailtitter, unsigned integer) ASC
Comments
Post a Comment