Hello,
I am looking for a more economical way to display the code below. What i have is ok for 1 group but i will need to run the same query over and over for about another 7 groups ( Group A to Group H). Can anyone suggest a neater way of obtaining the same results.
Thanks
//open the connection
$conn = mysql_connect("$glob_host", "$glob_user", "$glob_pass");
mysql_select_db($db_name, $conn);
//create the sql statement for all the games in Group C
$sql = "SELECT *
FROM dcass_games
WHERE team1_result = 'tbc'
AND xgroup = 'Group C'
ORDER BY game_date DESC";
$result = mysql_query($sql, $conn)or die(mysql_error());
// Set a variable to display results on screen later
$display_block = "";
$count=0;
//will go through each row in the result set and display data
while ($row = mysql_fetch_array($result)) {
//give a name to the fields
$group = $row['xgroup'];
$tournament = $row['tournment'];
$game_date=$row['game_date'];
$venue=$row['venue'];
$team1=$row['team1'];
$team2=$row['team2'];
$team1_result=$row['team1_result'];
$team2_result=$row['team2_result'];
$game_id = $row['game_id'];
$display_blockc .= "<table width=\"400\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"content\"><tr><td width=\"50\">$game_date</td><td width=\"150\">$team1</td><td width=\"25\">V</td><td width=\"150\">$team2</td></tr></table>
";
}