Ipv4 Addresses on MySQL

Did You know that you can store ip addresses on mysql with no string handling? Well, I did not.

INSERT INTO ip_table ('ipv4') VALUES (INET_ATON(""));
SELECT INET_NTOA('ipv4') FROM ip_table;

Well this does the trick, INET_ATON and INET_NTOA function transforms the ip address into his numeric value(Integer) and vice versa.

el_avena Off…