\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } $type = (is_numeric($_GET['type'])) ? $_GET['type'] : 1; include'dataedit/sql.php'; $cq = mysql_query("SELECT EstDetails.RecordID, EstDetails.Name, town, EstablishmentType.type, Esttype, CountyName, CountyDetails.CountryID, Country.Name AS cname FROM EstDetails INNER JOIN reviews ON reviews.est = EstDetails.RecordID AND reviews.display = 1 INNER JOIN EstablishmentType ON EstablishmentType.ID = EstDetails.EstType INNER JOIN CountyDetails ON CountyDetails.RecordID = EstDetails.County INNER JOIN Country ON CountyDetails.CountryID = Country.ID WHERE Esttype = $type ORDER BY CountryID, CountyName, Name")or mailjim('q', mysql_error()); $title = mysql_fetch_object($cq); mysql_data_seek($cq, 0); echo << Independent Reviews of {$title->type}s from all over the uk EOT; ?>

Related links:

Reports | Hotels | B&B's | Restaurants | Events | Pubs | Shops

type}s"); ?>

Independent reviews, {$title->type}s

\n"; include'linkunit.txt'; echo'

We have '.mysql_num_rows($cq).' reviews posted since April 2005
'; $check = ''; $cncheck = ''; while($row = mysql_fetch_object($cq)){ if($cncheck != $row->cname){ echo"$row->cname: \n"; $cncheck = $row->cname; } if($check != $row->CountyName){ echo"$row->CountyName | "; $check = $row->CountyName; } } mysql_data_seek($cq, 0); echo'

    '; $counter = 0; $check = ''; $ccheck = ''; $cncheck = ''; while($row = mysql_fetch_object($cq)){ if($ccheck != $row->CountyName){ echo"

"; if($cncheck != $row->cname){ echo"$row->cname
\n"; $cncheck = $row->cname; } echo"$row->CountyName

    \n"; $ccheck = $row->CountyName; } if($check != $row->RecordID){ echo"
  • $row->Name, $row->town
  • \n"; $check = $row->RecordID; $counter++; //every 20 lines put a to top link if(($counter % 20) == 0){ echo"To Top\n"; } } } ?>