Select c.*, ci.name cityname, ci.country citycountry FROM restaurants as c Join cities as ci on (c.cityID = ci.cityID) Where 1 = 1 AND id = 247 Order By sortOrder Invalid query: Select c.*, ci.name cityname, ci.country citycountry FROM restaurants as c Join cities as ci on (c.cityID = ci.cityID) Where 1 = 1 AND id = 247 Order By sortOrder