I currently have this SQL statement that works if there is only one row in the table but if there is more than one it doesn't work.
$mon = mysql_query("SELECT SUM(amount)AS `ingame` FROM `players` WHERE `playername` = '$player'")or die(mysql_error());
$money = mysql_fetch_assoc($mon);
$moneyingame = $amount['ingame'];
An example of the table
PLAYERNAME AMOUNT
player1 100
player1 100
player2 100
player3 100
so when i run the SQL in the code if player1 it should return 200