I am trying to pull data from my DB and display it as a table in a Forum Side Block. I can not figure out where I am going wrong I have looked at multiple posts on here and Vbulletin.com and none of them seem to help me. When viewing this please keep in mind I am self taught and a novice at this. Here is my code for the side block..... If you see where I screwed up or know a better way to pull this info please let me know.
PHP Code:
$query = "SELECT team_id, win, loss FROM match_results WHERE season_id=12";
$result = mysql_query($query);
echo "<table>";
while($row = mysql_fetch_array($result)){
echo "<tr><td>" . $row['Team'] . "</td><td>" . $row['Wins'] . "</td><td>" .$row['Losses'] . "</td></tr>";
}
echo "</table>";