Current Query: "select c.country, s.certainty from ddr_fp.Countries c join ddr_fp.Subnets s on c.countryid = s.countryid where s.subnetaddress = '{$IP}'"; Queries I want inclued: select c.city, s.certainty from Cities c join Subnets s on c.cityid = s.cityid where s.subnetaddress = "'{$IP}'"; select c.region, s.certainty from Regions c join Subnets s on c.regionid = s.regionid where s.subnetaddress = "'{$IP}'";