Best field type for storing various of data to MySQL table

IP address:

Use: INT 4 Unsigned

Convert the IP address to 32-bit unsigned integer before storing it to table.
You can use built in MySQL INET_ATON() and INET_NTOA() function to convert this.
Sample:
INSERT INTO table SET ip = INET_ATON('192.168.0.1')

——————————

Unix timestamp:

Use: INT

——————————

Tagged with 
About sepedatua
I am nothing special, of this I am sure. I am a common man with common thoughts and I’ve led a common life. There are no monuments dedicated to me and my name will soon be forgotten, but I’ve loved another with all my heart and soul, and to me, this has always been enough.

Leave a Reply