Re: inet_aton() and inet_ntoa() functions in php....
| From: | Kieu D. Trang | Date: | Mon, 19 May 2003 14:16:23 +0000 |
| Subject: | Re: inet_aton() and inet_ntoa() functions in php.... | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27890@lists.php.net to get a copy of this message | ||
HEY........
thanks if you planned on answering.... I found my error...
my mistake was... i didn't quote my string inside inet_aton()...
it's supposed to be inet_aton("123.0.0.0")... just in case anyone wants to
know....
:)
KD
On Mon, 19 May 2003, Kieu D. Trang wrote:
> hi all..
>
> does anyone know how to use these 2 functions in mySQL?
> inet_aton() and inet_ntoa()?
>
> i have this select statement, and it gives me an error...
>
> SELECT COUNT(*) FROM ptr_table WHERE ip >=INET_ATON(123.0.0.0) AND ip
> <=INET_ATON(123.255.255.255);
>
> these are not PHP built in function... I guess i can make them user
> defined functions...
>
> before i tried that SELECT statement.... I converted the ip using
> ip2long() function, but
> this sometimes gives me a negative number... so no luck in that... :(
>
> any help would be appreciated.......
> KD
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>