order by ASC
| From: | John Taylor-Johnston | Date: | Sun, 17 Jan 2010 04:52:30 +0000 |
| Subject: | order by ASC | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-301155@lists.php.net to get a copy of this message | ||
Ok, I think this is a MySQl question. Take pity on me?
$sql = "SELECT * FROM $db.
mailinglist WHERE type IN ('Member', 'Affiliated', 'Life Member') ORDER BY rollnumber ASC";
rollnumber is a varchar(50). I need it to be a text field. ASC does not order the way I want.
1000
1001
998
999
I want it to order like this:
998
999
1000
1001
How do I trick it? I cannot think of a way in MySQL. Is there a way in PHP?