php and mysql
| From: | Scott Mebberson | Date: | Mon, 23 Oct 2000 08:10:25 +0000 |
| Subject: | php and mysql | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-21737@lists.php.net to get a copy of this message | ||
Hi guys,
I have a small problem and wonder if anyone has had the same problem.
I am using MySQL and PHP for this application. I am retrieving some data
from the MySQL database. I am using SELECT and then ORDER BY. I am ordering
it by the content in a feild called elementID which contains numbers (1, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11). But when I extract it, MySQL is ordering it
like Windows Explorer orders files -- 1, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9 --
This was cool though, I changed it to be 01, 02 ,03 ,etc and it all work.
The only thing is though, I was using a php loop to extract the files and
the loop could only understand the 1, 2, 3, 4 numbering system and not the
01, 02, 03
So I am a little screwed. Anybody have a working around for this.
thanks
scott.