From: CodeHeads Date: February 24 2006 4:40pm Subject: RE: Number Searches In-reply-to: List-Archive: http://lists.mysql.com/mysql/195157 Message-Id: <1140799212.10654.1.camel@FC5> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-wdU9b6P53VmnT7H/CYKH" --=-wdU9b6P53VmnT7H/CYKH Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 2006-02-24 at 10:02 -0600, John Trammell wrote: > > On Wed, 2006-02-22 at 16:49 -0600, Ariel S=C3=A1nchez Mora wrote: > > > So far i've been able to store ip addresses as strings like=20 > > you would > > > type them in DOS, for ex, '192.168.0.1'. This serves me=20 > > 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=3D'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. >=20 > You might want to look into MySQL functions INET_ATON() and INET_NTOA(): >=20 > http://dev.mysql.com/doc/refman/4.1/en/miscellaneous-functions.html >=20 WOW, thank you! learn something every day. This is why I love the IT field! :) Thanks again. --=20 Best regards, ~WILL~ Key: http://code-heads.com/keys/ch1.asc=20 Key: http://code-heads.com/keys/ch2.asc=20 Linux Commands: http://code-heads.com/commands=20 Linux Registered User: 406084 (http://counter.li.org/) --=-wdU9b6P53VmnT7H/CYKH Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (GNU/Linux) iD8DBQBD/zbsfw3TK8jhZrsRAmCDAJ9x3HiVpOIb8e83VNAE+As/ZMIoNQCg3ct/ R0a+gxONpC8PX4lB6g4/IKU= =szx3 -----END PGP SIGNATURE----- --=-wdU9b6P53VmnT7H/CYKH--