List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:July 17 2001 2:27pm
Subject:Re: Sorting strings
View as plain text  
Check the misc. functions section in the users manual 7.4.12 or thereabouts.
Specifically INET_NTOA() and INET_ATON().

Daniel.Kurucz@stripped wrote:

> Hi,
> 
> I have some large tables, which contain also IP-Adresses as strings.
> Is there any workaround (which uses MySQL-functions) to sort strings as
> numbers ?
> Because, when i sort the records, the order is always 1.1.1.1; 1.1.1.10;
> 1.1.1.2. (which is correct if i'm sorting strings...)
> But i need the result : 1.1.1.1; 1.1.1.2; 1.1.1.10...
> 
> There is no possibility to change the IP-Adresses to 001.002.003.004 or
> so... :-((
> 
> Thanx in advance :
> Daniel
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <mysql-thread79877@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
gerald_clark@stripped

Thread
Sorting stringsDaniel.Kurucz17 Jul
  • Re: Sorting stringsGerald Clark17 Jul