I'd like to store an IP Address in MySQL as an UNSIGNED INT Column using PHP.
I need to convert the IP format like '192.168.23.124' into an integer. I'm aware of those two functions: INET_NTOA() and INET_ATON (chapter 7.4.12 MySQL tutorial). The problem is, they have been added in MySQL 3.23.15 and I my script should also work on 3.22.xx
Any idea how to convert the IP? I'd like to do it directly in an SQL-statement but if not possible, has anyone got an idea how to do it in PHP?
Philip
I need to convert the IP format like '192.168.23.124' into an integer. I'm aware of those two functions: INET_NTOA() and INET_ATON (chapter 7.4.12 MySQL tutorial). The problem is, they have been added in MySQL 3.23.15 and I my script should also work on 3.22.xx
Any idea how to convert the IP? I'd like to do it directly in an SQL-statement but if not possible, has anyone got an idea how to do it in PHP?
Philip