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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to