Firstly, thanks for everyone who has been help me on this forum. I have a problem I hope you good people can solve.
I run the following script within a 'player profile.php page'
$data = mysql_query("SELECT * FROM world_cup_scores, world_cup_users WHERE username='$username'")
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
if ( $info['match_score_ga1h'].$info['match_score_ga1a'] == $info['ga1h'].$info['ga1a'] ) {
$result = mysql_query("UPDATE world_cup_users SET pts_ga1='4' WHERE username='$username'" );
echo $info['correct_score_ga1'];
Basically, the database for each player is only updated when they log into their profile. Is there a way I can update all players at once but keeping the if conditions to each player's own values?
Thanks for your assistance.