[nflug] really dumb SQL question

Eric Benoit ebenoit at hopevale.com
Fri Dec 16 13:17:32 EST 2005


Frank: PHP

Justine: So I would be able to order by ascending for binary? Would 
binary complain about the periods ...probably not right?



Frank Kumro wrote:
> How its doing the ASC its comparing the .112 to .20 and .112 < .20
> since 192.0.0 == 192.0.0 - You could always write a routine that sorts
> the resultset when you recieve it. Since it would be custom you would
> have complete control over how it sorts. Ill take a look to see if i
> can find a solution...what lang you working with?
> 
> On 12/16/05, Eric Benoit <ebenoit at hopevale.com> wrote:
> 
>>I know this is slightly off the topic of this list,
>>
>>but I know there are some programmers out there ;)
>>
>>I have a column labled ip address, it is varchar, oddly enough I input
>>...ip addresses in it. ha ha ha
>>
>>Here's my question:
>>
>>When I query the column and do an "order by ip_address ASC" the records
>>won't ascend the way I want ex: 192.0.0.20, 192.0.0.112  and so on
>>
>>instead they ascend this way: 192.0.0.112, 192.0.0.20
>>
>>I am guessing this is because ASC doesn't like the periods?
>>
>>A finger pointed in some general direction would be great.
>>
>>Thanks,
>>Eric
>>_______________________________________________
>>nflug mailing list
>>nflug at nflug.org
>>http://www.nflug.org/mailman/listinfo/nflug
>>
> 
> 
> 
> --
> Frank
> Shenanigans!!
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug
_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list