\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } $type = (is_numeric($_GET['type'])) ? $_GET['type'] : 2; switch($type){ case 2: $sql = "SELECT Shops.ID, Shops.Name, town, county, ShopTypes.type, CountyDetails.CountyName, CountryID, Country.Name AS cname FROM Shops INNER JOIN reviews ON reviews.est = Shops.ID AND reviews.display = 1 AND reviews.type = 2 INNER JOIN ShopTypes ON ShopTypes.ID = Shops.type INNER JOIN CountyDetails ON CountyDetails.RecordID = Shops.county INNER JOIN Country ON CountyDetails.CountryID = Country.ID ORDER BY CountryID, CountyName, Name"; $title = 'Shop'; break; case 3: $sql = "SELECT Sports.ID, Sports.Name, town, county, SportTypes.type, CountryID, CountyDetails.CountyName, Country.Name AS cname FROM Sports INNER JOIN reviews ON reviews.est = Sports.ID AND reviews.display = 1 AND reviews.type = 3 INNER JOIN SportTypes ON SportTypes.ID = Sports.type INNER JOIN CountyDetails ON CountyDetails.RecordID = Sports.county INNER JOIN Country ON CountyDetails.CountryID = Country.ID ORDER BY CountryID, CountyName, Name"; $title = 'Sport'; break; case 4: $sql = "SELECT events.eventid AS ID, events.event AS Name, town, county, CountryID, CountyDetails.CountyName, Country.Name AS cname FROM events INNER JOIN reviews ON reviews.est = events.eventid AND reviews.display = 1 AND reviews.type = 4 INNER JOIN CountyDetails ON CountyDetails.RecordID = events.county INNER JOIN Country ON CountyDetails.CountryID = Country.ID ORDER BY CountryID, CountyName, event"; $title = 'Event'; break; } include('dataedit/sql.php'); $q = mysql_query($sql)or mailjim('q', "$sql\n".mysql_error()); echo << Independent Reviews on British {$title}s clubs EOT; ?>

Independent reviews on British {$title}s clubs

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

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

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

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

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

Books:

A History of Britain
A History of Britain
The Good Pub Guide
The Good Pub Guide
Dog Friendly
Dog Friendly
Notes from a Small Island
Notes from a Small Island
The Good Food Guide
The Good Food Guide
A-Z Great Britain: Handy Road Atlas
A-Z Great Britain: Handy Road Atlas
Good Hotel Guide Great Britain and...
Good Hotel Guide Great Britain and...
Days Out UK 2003
Days Out UK 2003
AA the Hotel Guide
AA the Hotel Guide
Michelin Red Guide: Great Britain and...
Michelin Red Guide: Great Britain and...
The Good Bed and Breakfast Guide
The Good Bed and Breakfast Guide
The Ultimate Guide to Romantic Hotels:...
The Ultimate Guide to Romantic Hotels:...