View Single Post

   
  #3 (permalink)  
Old 02-28-2008, 07:55 AM
Jerry Stuckle
 
Posts: n/a
Default Re: How to sort numerically?

Sergey wrote:
> Hi,
>
> Could somebody please help me? I use the following SQL command to take the
> data and then sorts it:
>
> $querystr = "select
> ID,Name,Description,PictureURL,InformationURL,Rate ,10_Min,20_Min,Connect
> from $Table_Name order by 10_Min desc,Rate asc,Connect asc";
> $sth = &sql($querystr);
>
> For some reason the sorted results look like this (field 10_Min):
>
> 526
> 412
> 135
> 1342
> 125
> 95
>
> Why is 1342 not on top of this list and what do I need to do to change in
> the code to have 1342 on top? I assume right now it creates an ASCII order,
> and not a numeric one. Could somebody please tell me what I need to change
> in order to sort my results numerically?
>
> Thanks,
>
> Alex
>
>
>


This isn't ASCII order, either. What's your table definition and what's
the entire output of your query?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote