$band = empty($_REQUEST['band']) ? get_band_name() : $_REQUEST['band'];
$term = $mdb->escape('%' . $band . '%');
?>
Forthcoming Gigs
Forthcoming Gigs
$today = date('Y-m-d', strtotime('-3 years'));
$query = 'SELECT * FROM gigguide WHERE dating >= \'' . $today . '\' AND
(artists LIKE \'' . $term . '\' OR town LIKE \'' . $term . '\' OR venue LIKE \'' . $term . '\')
ORDER BY dating';
$gigs = $mdb->query($query);
echo '';
while ($gig = $gigs->fetchRow()) {
$usetime = date('dS M Y', strtotime($gig->dating));
echo '- ' . $usetime . ': ' . $gig->venue . ', ' . $gig->town . '
' . "\n";
}
if (! $gigs->numRows()) {
echo '- No gigs listed for this artist
';
}
?>