Mega Code Archive

 
Categories / MySQL Tutorial / Miscellaneous Functions
 

INET_ATON() also understands short-form IP addresses

mysql> mysql> SELECT INET_ATON('127.0.0.1'), INET_ATON('127.1'); +------------------------+--------------------+ | INET_ATON('127.0.0.1') | INET_ATON('127.1') | +------------------------+--------------------+ |             2130706433 |         2130706433 | +------------------------+--------------------+ 1 row in set (0.00 sec) mysql>