Please help
I have 2 tables in my database one holding game_id and player_id. The other is the game table where it holds all data about the game ie points for against wonlostdrawn etcetc. But I need to count hom many times a player has played a game and won.
ie tables below
table players
game_id player_id
1 2
1 4
1 6
2 2
2 5
2 8
So I can easy do a quirie on this ie
$resultwon = mysql_query("select game_id, player_id from wars_completed_players where player_id=2");
this would give me games 1 and 2 which player 2 has played in
Now the other table
games
id vers pointsfor wld
1 bots 100 1
2 zuse 120 2
3 bots 10 3
4 zuse 200 1
the field wld = won lost drawn
So now i need to count and check which games he played and which ones he won in ie=1
from the above example he would have won 1 game
can anyone help to get me the result ??
lee