Every time the winning team wins I would like to have this image appear after the winning team name. Now to determine the winning team is based on the highest runs.
Take a look at this page to understand what I mean. Now please don't be fooled by is appearing after the winning team because the command isn't correct. It just appears on the bottom team or the home team.
away = top team
bottom = home.
Here is the PHP code
PHP Code:<?php
$generate = '';
$result = mysql_query("SELECT * FROM boxscoreaway ORDER BY 'id' ASC");
$away = mysql_fetch_array($result);
$result = mysql_query("SELECT * FROM boxscorehome ORDER BY 'id' ASC");
$home = mysql_fetch_array($result);
// the away team just began
$generate .= '<tr style="background-color:eeeeee">
<td width="254"><table width="100%" border="0">
<tr>
<td id="team" width="40%">' . $away['team'] . '</td>
<td align="left" width="60%">';
if( $away['winner'] != '' ) {
$generate .= '<img src="http://robbyzworld.com/personal/images/sports/nyy/winner.gif" />';
}
$generate .= '</td>
</tr>
</table></td>
<td width="30" id="RHE">' . $away['R'] . '</td>
<td width="30" id="RHE">' . $away['H'] . '</td>
<td width="30" id="RHE">' . $away['E'] . '</td>
</tr>';
// the away team just ended
// the home team just began
$generate .= '<tr style="background-color:eeeeee">
<td width="254"><table width="100%" border="0">
<tr>
<td id="team" width="40%">' . $home['team'] . '</td>
<td align="left" width="60%">';
if( $home['winner'] != '' ) {
$generate .= '<img src="http://robbyzworld.com/personal/images/sports/nyy/winner.gif" />';
}
$generate .= '</td>
</tr>
</table></td>
<td width="30" id="RHE">' . $home['R'] . '</td>
<td width="30" id="RHE">' . $home['H'] . '</td>
<td width="30" id="RHE">' . $home['E'] . '</td>
</tr>';
// end the home team just ended
echo $generate;
?>




Reply With Quote