\r\n"; mail('jim.rolt@googlemail.com', $subject, $error, $headers); } include'dataedit/sql.php'; $town = !empty($_GET['town']) ? mysql_real_escape_string($_GET['town']) : 'Worcester'; $sql = "SELECT Shops.ID, Shops.Name, ShopTypes.Type, CountyDetails.CountyName, CountyDetails.CountyNameCut, CountyDetails.CountryID, CountyDetails.bcomregion, Shops.County FROM Shops INNER JOIN ShopTypes ON (ShopTypes.ID = Shops.TYPE OR ShopTypes.ID = Shops.Type2) INNER JOIN CountyDetails ON Shops.County = CountyDetails.RecordID WHERE Shops.Town REGEXP '^".preg_replace("/[-\s]/", ".", $town)."$'"; if(isset($county)){$sql .= "AND Shops.County = $county ";} $sql .= "GROUP BY Shops.ID ORDER BY Name"; //$q = mysql_query($sql)or mailjim('q', "$sql\n".mysql_error()); $q = mysql_query($sql); $row = mysql_fetch_object($q); $cname = $row->CountyName; $county = !empty($row->County) ? $row->County : 1; echo <<Shop directory for $town, $cname EOT; ?>
CountyNameCut); include'locallinks.php'; $llins = new locallinks($county,$row->CountryID); echo $llins->output; include'featuredtownhotels.php'; feature($county,$town); include'adviva.txt'; include'burstmedia.txt';; ?>
bcomregion); ?>
Shops in $town"; include'linkunit.txt'; ?>
 

click to add your business for free | Today's best Hotel rates

0){mysql_data_seek($q, 0);} while($row = mysql_fetch_object($q)){ echo"$row->Name, ($row->Type)
\n"; } ?>