> On Wed, 2006-02-22 at 16:49 -0600, Ariel Sánchez Mora wrote:
> > So far i've been able to store ip addresses as strings like 
> you would
> > type them in DOS, for ex, '192.168.0.1'. This serves me 
> great since my
> > application uses IP addresses as strings in all cases. I've done
> > queries with the IP column , for example, select office_name from
> > table_1 where ip='10.100.1.1'; and have never had any problems.
> > However, if you plan on sorting based on this column, strings with
> > periods do not behave correctly, and the answers to my previous
> > question on this list do not apply; it makes a good aproximation,
> > though.

You might want to look into MySQL functions INET_ATON() and INET_NTOA():

http://dev.mysql.com/doc/refman/4.1/en/miscellaneous-functions.html


INFORMATION IN THIS MESSAGE, INCLUDING ANY ATTACHMENTS, IS INTENDED FOR THE 
PERSONAL AND CONFIDENTIAL USE OF THE INTENDED RECIPIENT(S) NAMED ABOVE. If you 
are not an intended recipient of this message, or an agent responsible for 
delivering it to an intended recipient, you are hereby notified that you have 
received this message in error, and that any review, dissemination, 
distribution, or copying of this message is strictly prohibited. If you 
received this message in error, please notify the sender immediately, delete 
the message, and return any hard copy print-outs.

This message has been scanned for viruses by McAfee's Groupshield.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to