Re: ip range lookup

2003-10-04 Thread Jose Miguel
Hi Willem: I have the same database and the only thing different is that I included the country iso name into the primary key: mysql> describe ip_country_database; +-+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +

Re: ip range lookup

2003-10-04 Thread Matt W
Hi Willem, I don't *think* MySQL optimizes BETWEEN like that to use an index. Have you tried this?: SELECT * FROM ipcountry WHERE ip1 >= 123456789 AND ip2 <= 123456789; Matt - Original Message - From: "Willem Bison" Sent: Saturday, October 04, 2003 6:08 PM Subject: ip range lookup