Re: php and mysql
| From: | Scott Mebberson | Date: | Mon, 23 Oct 2000 08:34:32 +0000 |
| Subject: | Re: php and mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21742@lists.php.net to get a copy of this message | ||
Thanks guys,
The prob was it was a numerical value just varcchar(4) so I changed it to
int(4) and it worked fine!!
""Scott Mebberson"" <scott@redbluedesign.com> wrote in message
news:8t0rkv$o0e$1@toye.p.sourceforge.net...
> 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.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>