Re: Comparing x.x.x.x strings

2006-03-27 Thread Jake Peavy
On 3/27/06, Lucas Vendramin <[EMAIL PROTECTED]> wrote: > > Thank you. > The INET_ATON() function works fine. :D > I hope this solution save me. > Thanks. > > > Take a look at the MySQL function INET_ATON and it's counterpart (I > don't > > remember what it's counterpart is but it should be easy to

Re: Comparing x.x.x.x strings

2006-03-27 Thread Lucas Vendramin
Thank you. The INET_ATON() function works fine. :D I hope this solution save me. Thanks. Take a look at the MySQL function INET_ATON and it's counterpart (I don't remember what it's counterpart is but it should be easy to find once you find INET_ATON). I know in PHP there is a function that wil

Re: Comparing x.x.x.x strings

2006-03-24 Thread Peter Brawley
>When I compare two strings in mask (x.x.x.x) the comparation is not true (for my question :D)... look: >select '3.2.0.13' > '3.2.0.2'-> FALSE >I want this command return TRUE, but it is returning FALSE. select inet_aton('3.2.0.13') > inet_aton('3.2.0.2'); +--

Re: Comparing x.x.x.x strings

2006-03-24 Thread Dan Nelson
In the last episode (Mar 24), Lucas Vendramin said: > Hi all. > I have a problem: > When I compare two strings in mask (x.x.x.x) the comparation is not > true (for my question :D)... look: > select '3.2.0.13' > '3.2.0.2'-> FALSE > I want this command return TRUE, but it is returning FA

Re: Comparing x.x.x.x strings

2006-03-24 Thread Jay Paulson
Take a look at the MySQL function INET_ATON and it's counterpart (I don't remember what it's counterpart is but it should be easy to find once you find INET_ATON). I know in PHP there is a function that will convert x.x.x.x to an int and then you just put that int into a field in your database and

Re: Comparing x.x.x.x strings

2006-03-24 Thread Rhino
I don't know the answer to your question but I know that this issue has been discussed in this mailing list before. Look in the MySQL archives and I'm sure you will find an answer on the best way to compare IP addresses. -- Rhino - Original Message - From: "Lucas Vendramin" <[EMAIL PR