Re: ips and mysql table.

From: Date: Mon, 04 Mar 2002 09:04:34 +0000
Subject: Re: ips and mysql table.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87057@lists.php.net to get a copy of this message
Hey Kunal, > I have a mysql table which stores the IP Address of my site visitors. When I > try to sort these Ip address in the ascending or descending order the order > is completely out of order. I am currently storing the IP addresses under a > varchar column. An int column would not store the values after the second > "." You don't show examples of "completely out of order"! My guess is that you(r friend) have not stored the IP address as four octets in dotted notation, and therefore "20.123.456.789" succeeds "100.123.456.789". In which case, left pad with zeros. Regards, =dn

« previous php.general (#87057) next »