SELECT name FROM name2ip WHERE ip = someip; -- or, LIKE blah or whatever