I have a database that stores all the ip addresses of the machines on my network. One table consists of the ip address itself, and the second field is an ip_number (converted via the ip2long function in php). I could not find a way to search on the normal, dotted quad IP address notation, hence the ip_number field. I can easily search on this field when using the entire IP address, but would like to allow the user to enter partial IP addresses. Any ideas on how I can do this when I need to convert the IP address to an IP number to actually do the search?