List:General Discussion« Previous MessageNext Message »
From:CodeHeads Date:February 24 2006 4:40pm
Subject:RE: Number Searches
In-reply-to:
<C7739D1822C78B45BE6CC05CBB75BC00A28F9C@NEIL.universe.holmescorp.com>
View as plain text  
On Fri, 2006-02-24 at 10:02 -0600, John Trammell wrote:
> > 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
> 

WOW, thank you! learn something every day. This is why I love the IT
field! :)

Thanks again.
-- 
Best regards,
~WILL~
Key: http://code-heads.com/keys/ch1.asc 
Key: http://code-heads.com/keys/ch2.asc 
Linux Commands: http://code-heads.com/commands 
Linux Registered User: 406084 (http://counter.li.org/)

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Thread
Number SearchesCodeHeads22 Feb
  • Re: Number SearchesRhino22 Feb
  • Re: Number SearchesDavid T. Ashley22 Feb
RE: Number SearchesAriel Sánchez Mora22 Feb
RE: Number SearchesCodeHeads23 Feb
  • Re: Number SearchesMathieu Bruneau24 Feb
    • Re: Number SearchesCodeHeads24 Feb
RE: Number SearchesAriel Sánchez Mora23 Feb
RE: Number SearchesCodeHeads23 Feb
RE: Number SearchesJohn Trammell24 Feb
RE: Number SearchesCodeHeads24 Feb