IP address datatype - any ideas or pointers?
| From: | Frank Flynn | Date: | Sun, 07 Apr 2002 04:22:54 +0000 |
| Subject: | IP address datatype - any ideas or pointers? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-18280@lists.php.net to get a copy of this message | ||
Hi All,
I'm just starting on a database to track IP addresses. I'm thinking about
how best to store the IP address - 4 tinyints, varchar or char; as one big
varchar or 4 chunks?
We will eventually want to look at things by net or subnet and being able to
search on the various parts of the address would be useful I suppose and I
clearly need to spot user error like a value over 255.
Is there anything out there that I might use or at least look at for ideas?
Thanks
Frank frank@declan.com