Re: Best Fieldtype to store IP address...

2005-11-11 Thread Evan Borgstrom
The same way the kernel deals with them; int(10) unsigned. To convert a dotted quad string into int(10) use the following: Using 192.168.10.50: 192 + (168 * 2^8) + (10 * 2^16) + (50 * 2^24) = 839559360 This is real handy if you're doing low level socket stuff and storing addresse

Re: Best Fieldtype to store IP address...

2005-11-11 Thread Evan Borgstrom
t;> text(16) >> >> Not quite sure how to get the best memory utilization... > > None of the above. > > Peter M. Groen wrote: >> How about: >> >> Field 1: First octet (int) >> Field 2: Second octet (int) >> Field 3: Third octet (int) &