List:General Discussion« Previous MessageNext Message »
From:Peter Hicks Date:February 11 2003 6:29pm
Subject:Re: IP Addresses -- How to Store
View as plain text  
On Tue, 11 Feb 2003, Dan Nelson wrote:

> Store your addresses as INTs, so you would have three fields:
> "address", "netmask", and "gateway".  You can either encode the values
> yourself, or use mysql's INET_NTOA()/INET_ATON() functions.

...and beware, INET_NTOA/ATON calls aren't compatible (as far as I can see)
with PHP's equivilent calls.  PHP uses signed integers, and MySQL not.

Has anyone come up with a workaround to this on either the MySQL or PHP sides?


Peter.

Thread
IP Addresses -- How to StoreAaron Conaway11 Feb
  • Re: IP Addresses -- How to StoreDan Nelson11 Feb
    • Re: IP Addresses -- How to StorePeter Hicks11 Feb
  • Re: IP Addresses -- How to StoreMichael T. Babcock11 Feb
  • Re: IP Addresses -- How to StorePeter Grigor11 Feb
    • Re: IP Addresses -- How to StoreMichael T. Babcock11 Feb
RE: IP Addresses -- How to StoreAaron Conaway11 Feb