$types[1] $friends[2] in
Derbyshire:
";
$query_string = "SELECT * FROM a3_links_bandb WHERE county = 'Derbyshire'";
$result_id = mysql_query($query_string);
while($row = mysql_fetch_array($result_id))
{
$derbyshire[] = $row['establishment'];
}
shuffle($derbyshire);
foreach($derbyshire as $bandb)
{
$query_string = "SELECT * FROM a3_links_bandb WHERE establishment = '$bandb'";
$result_id = mysql_query($query_string);
$details = mysql_fetch_array($result_id);
$town = $details['town'];
$homepage = $details['homepage'];
$type = $details['type'];
shuffle($types);
if ($type == "b"){echo "\n - $bandb $types[0] $town
";}
if ($type == "h"){echo "\n - $bandb hotel $town
";}
}
echo "
";
echo "
$types[1] $friends[1] in Berkshire:
";
$query_string = "SELECT * FROM a3_links_bandb WHERE county = 'Berkshire'";
$result_id = mysql_query($query_string);
while($row = mysql_fetch_array($result_id))
{
$berkshire[] = $row['establishment'];
}
shuffle($berkshire);
foreach($berkshire as $bandb)
{
$query_string = "SELECT * FROM a3_links_bandb WHERE establishment = '$bandb'";
$result_id = mysql_query($query_string);
$details = mysql_fetch_array($result_id);
$town = $details['town'];
$homepage = $details['homepage'];
$type = $details['type'];
shuffle($types);
if ($type == "b"){echo "\n - $bandb $types[0] $town
";}
if ($type == "h"){echo "\n - $bandb hotel $town
";}
}
echo "
";
echo "
";
$query_string = "SELECT * FROM a3_links_bandb WHERE county = 'Buckinghamshire'";
$result_id = mysql_query($query_string);
while($row = mysql_fetch_array($result_id))
{
$buckinghamshire[] = $row['establishment'];
}
shuffle($buckinghamshire);
foreach($buckinghamshire as $bandb)
{
$query_string = "SELECT * FROM a3_links_bandb WHERE establishment = '$bandb'";
$result_id = mysql_query($query_string);
$details = mysql_fetch_array($result_id);
$town = $details['town'];
$homepage = $details['homepage'];
$type = $details['type'];
shuffle($types);
if ($type == "b"){echo "\n - $bandb $types[0] $town
";}
if ($type == "h"){echo "\n - $bandb hotel $town
";}
}
echo "
";
echo "
$types[1] $friends[3] in Oxfordshire:
";
$query_string = "SELECT * FROM a3_links_bandb WHERE county = 'Oxfordshire'";
$result_id = mysql_query($query_string);
while($row = mysql_fetch_array($result_id))
{
$oxfordshire[] = $row['establishment'];
}
shuffle($oxfordshire);
foreach($oxfordshire as $bandb)
{
$query_string = "SELECT * FROM a3_links_bandb WHERE establishment = '$bandb'";
$result_id = mysql_query($query_string);
$details = mysql_fetch_array($result_id);
$town = $details['town'];
$homepage = $details['homepage'];
$type = $details['type'];
shuffle($types);
if ($type == "b"){echo "\n - $bandb $types[0] $town
";}
if ($type == "h"){echo "\n - $bandb hotel $town
";}
}
echo "
";
echo "
$types[1] $friends[2] in West Sussex:
";
$query_string = "SELECT * FROM a3_links_bandb WHERE county = 'West Sussex'";
$result_id = mysql_query($query_string);
while($row = mysql_fetch_array($result_id))
{
$west_sussex[] = $row['establishment'];
}
shuffle($west_sussex);
foreach($west_sussex as $bandb)
{
$query_string = "SELECT * FROM a3_links_bandb WHERE establishment = '$bandb'";
$result_id = mysql_query($query_string);
$details = mysql_fetch_array($result_id);
$town = $details['town'];
$homepage = $details['homepage'];
$type = $details['type'];
shuffle($types);
if ($type == "b"){echo "\n - $bandb $types[0] $town
";}
if ($type == "h"){echo "\n - $bandb hotel $town
";}
}
echo "
";
$query_string = "SELECT * FROM a3_links WHERE linkkey = 'other'";
$result_id = mysql_query($query_string);
$row = mysql_fetch_array($result_id);
$text = $row['links'];
echo "$text";
?>