The code below is for my scoreboard to display games that have been played or are going to be played.
The issue i have is with the code below in RED.
When the game hasnt been played it doesnt show the "F" or the "OT" which is correct
but when the game has been played it always shows the "F" and when its an OT game its supposed to show "OT" but shows "F"
any ideas on what i might be missing???
thanks
$today = date("Y-m-d", mktime(date("H")-2, date("i"), 0, date("m") , date("d"), date("Y")));
$gamequery=mysql_query("select * from schedule_scores where league = 1 AND date = '".$today."' order by id");
$games = mysql_numrows($gamequery);
$scoreboard = 0;
if($games == 0) {
$scoreboard1 .= "<table><tr><td width=\"190\" align=\"center\" class=\"scoreboardtext\">No games scheduled</td></tr></table>";
} else {
$col2w=105;
while ($game=mysql_fetch_array($gamequery))
{
$scoreboard1 .= "
<div id=\"content".$scoreboard."\" >";
$scoreboard1 .= "<table width=\"190\">";
$team1=mysql_fetch_array(mysql_query("select * from teams where (id='".$game['team1']."')"));
$team2=mysql_fetch_array(mysql_query("select * from teams where (id='".$game['team2']."')"));
$gameid=mysql_fetch_array(mysql_query("select * from teams where (id='".$game['id']."')"));
[COLOR="#FF0000"] if($game["team1_score"]!=0 || $game["team1_score"]!=0)
$isF="F";
else if($game['ot_game'])
$isF="OT";
else
$isF=" "; [/COLOR]
$scoreboard1 .= "
<tr class=\"table_text\"><td width=\"40\"><a title=\"".$team1["city"]."\" href=\"./team/?id=".$team1["id"]."\" target=\"_top\"><img border=\"0\" width=\"35\" height=\"35\" src=\"http://theufhl.com/images/$game[team1pic]\"></a></td><td width=".$col2w." align=left>".$team1["city"]."</td><td width=\"25\">".$game["team1_score"]."</td><td rowspan=\"2\" width=\"20\" valign=center align=left class=\"table_text\" >".$isF." </td></tr>
<tr class=\"table_text\"><td width=\"40\"><a title=\"".$team2["city"]."\" href=\"./team/?id=".$team2["id"]."\" target=\"_top\"><img border=\"0\" width=\"35\" height=\"35\" src=\"http://theufhl.com/images/".$game["team2pic"]."\"></a></td><td width=".$col2w." align=left>".$team2["city"]."</td><td>".$game["team2_score"]."</td></tr>
";
$scoreboard1 .= "
</table>
</div>";
$scoreboard++;
}
}