You are here: Re: Storing IP in MySQL as DOUBLE or INT ? « All PHP « IT news, forums, messages
Re: Storing IP in MySQL as DOUBLE or INT ?

Posted by Pete on 02/04/06 01:19

> If you look at the mysql doc (
> http://dev.mysql.com/doc/refman/4.1/en/numeric-types.html ), you shall
> see that you can use a "INT UNSIGNED"

Thank you!
INT UNSIGNED seems to work fine. I am not sure how the inet_aton works, but
I guess the highest number in the database comes from the number of IPs
available. 4,294,967,295 is the same as 256*256*256*256 (minus 1, because
INT UNSIGNED uses 0 too).

I guess int unsigned is the optimal solution giving med the smallest
database possible (and possibly fastest too).

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация