ok... this is stumping me.... perhaps I'm doing something wring, but It
doesn't appear that I am....

Am I doing, or not doing something that makes the INET_ATON function
default to 127.255.255.255 ? why does it work for 24.18.10.5, but not
192.168.50.5 when inserting into a table?



mysql> SELECT INET_ATON("24.18.10.5");
+-------------------------+
| INET_ATON("24.18.10.5") |
+-------------------------+
|               403835397 |
+-------------------------+
1 row in set (0.01 sec)

mysql> SELECT INET_ATON("192.168.50.5");
+---------------------------+
| INET_ATON("192.168.50.5") |
+---------------------------+
|                3232248325 |
+---------------------------+
1 row in set (0.01 sec)

mysql> insert into sequoia VALUES ( INET_ATON("24.18.10.5"), 'TestHost',
'This is a test', 'Test' );
Query OK, 1 row affected (0.03 sec)

mysql> insert into sequoia VALUES ( INET_ATON("192.168.50.5"),
'TestHost2', 'This is a test', 'Test' );
Query OK, 1 row affected (0.01 sec)

mysql> select * from sequoia;
+------------+-----------+----------------+----------+
| ip         | hostname  | comment        | customer |
+------------+-----------+----------------+----------+
|  403835397 | TestHost  | This is a test | Test     |
| 2147483647 | TestHost2 | This is a test | Test     |
+------------+-----------+----------------+----------+
2 rows in set (0.01 sec)

mysql> select INET_NTOA(ip),hostname from sequoia;
+-----------------+-----------+
| INET_NTOA(ip)   | hostname  |
+-----------------+-----------+
| 24.18.10.5      | TestHost  |
| 127.255.255.255 | TestHost2 |
+-----------------+-----------+
2 rows in set (0.01 sec)



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to