//this is a query searching in food table $sql = "SELECT * FROM listings_food WHERE cuisine LIKE '%$cuisine%' ORDER BY name"; //somehow need to tell it: // SELECT * FROM listings_food WHERE cuisine LIKE '%$cuisine%' // AND rid = rid from table 'listings' and hide = '' ORDER BY name // //this is for the listing table while ($sql = mysql_fetch_object($result)){ $resultcount++; $rid = $sql -> rid; $name = $sql -> name; $address = $sql -> address; $area = $sql -> area; $town = $sql -> town; $country = $sql -> country; $postcode = $sql -> postcode; $telno = $sql -> telno; $faxno = $sql -> faxno; $description = $sql -> description; $keywords = $sql -> keywords; $lastupdated = $sql -> lastupdated; $catid = $sql -> catid; $hide = $sql -> hide; }