I’m getting the following error:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 2 on MySQL result index 5 in C:\xampp\htdocs\results.php on line **34
**When I run this script:
for($game = 0; $game < $totalRows_games; $game++){
$game_id = mysql_result($games, $game, "game_id");
$winner = mysql_result($games, $game_id, "winner");
$loser = mysql_result($games, $game_id, "loser");
//Here are the two lines that are giving me trouble---------------
$firstname_winner = mysql_result($players, $winner, "first_name");
$firstname_loser = mysql_result($players, $loser, "first_name");
//----------------------------------------------------------------
$win_score = mysql_result($games, $game_id, "win_score");
$lose_score = mysql_result($games, $game_id, "lose_score");
echo $firstname_winner;
echo " beat ";
echo $firstname_loser;
echo " ".$win_score." to ".$lose_score;
echo " in game number ".$game_id;
echo "<br/>";
}
Can anyone clue me in on what’s going on here or recommend a better way to approach this?