Problems with listing from multiple tables
I have the following code
PHP:<?php
echo ("<p class=\"side_title\"><b>Scorers Listing</b></p>");
$result = mysql_query("SELECT * FROM Football_scorers ORDER BY f_scorers_id DESC");
while($r=mysql_fetch_array($result))
{
extract($r);
$result = mysql_query("SELECT * FROM Football_players WHERE f_players_id=$f_scorers_players");
while($r=mysql_fetch_array($result))
{
extract($r);
echo ("<p>$f_players_name - $f_players_type");
}
$result = mysql_query("SELECT * FROM Football_games WHERE f_games_id=$f_scorers_games");
while($r=mysql_fetch_array($result))
{
extract($r);
echo ("- $f_games_date</p>");
}
}
?>
In the scorers table i have multiple entries however it is only listing one entry on the website, i know there is a simpler way of doing this but i can't remember for the life of me.
Any help would be appreciated.
Thanks
___________________
PHP Freak Wannabe!
