The best way would probably be to store the IP addresses as numbers and then do number comparison:
http://www.cflib.org/udf.cfm?ID=946 If that is not an option, you could try a wild card search: SELECT * FROM ip_address WHERE ip LIKE '123.456.___.003' This would find all IP address with matching 1st, 2nd, and 4th quadrants (leaving the thirst as a wild card). But you can't be sure of the length... Maybe something like: SELECT * FROM ip_address WHERE ip LIKE '123.456.%' AND ip LIKE '%.003' This would break the Ips up and not have to worry that the third quadrant is 1, 2, or 3 digits. Does that help at all? ....................... Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 x 14 212.691.3477 fax www.nylontechnology.com "Some people call me the space cowboy. Some people call me the gangster of love." -----Original Message----- From: Robert Everland III [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 28, 2006 10:52 AM To: CF-Talk Subject: Query Ip address How would I go about querying an ip address in a table. I need to pass in an ip address and be able to tell if that ip address is between a starting and ending address to get a user's location. Bob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244974 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

