noj75 Posted October 1, 2009 Share Posted October 1, 2009 Hi all, I am trying to get this code to update a gamers database field by 10 each time the query is run. The code is working fine in IE but for some reason it adds 30 in Firefox when it is supposed to add 10. Anyone any ideas on why its doing this? Is it something to do with the sessions? $mastery = $row['mastery']; /* Current mastery */ if($mastery == '0') { $mastery = '10'; } elseif($mastery > '0') { $mastery = $mastery + '10'; } if($row['mastery'] == '90') { $mastery = '0'; } $uqry = "UPDATE $table SET "; $uqry .= "mastery = '".$mastery."' "; $uqry .= "WHERE gamerid = '".mysql_real_escape_string($_SESSION['gid'])."'"; $ures = mysql_query($uqry); Quote Link to comment Share on other sites More sharing options...
Mark Baker Posted October 1, 2009 Share Posted October 1, 2009 Are you using firebug or similar plug-ins that can execute calls to the server a second time? Quote Link to comment Share on other sites More sharing options...
noj75 Posted October 1, 2009 Author Share Posted October 1, 2009 No mate, I am not. Quote Link to comment Share on other sites More sharing options...
noj75 Posted October 1, 2009 Author Share Posted October 1, 2009 The above code IS called inside a jquery iFrame popup though ! Quote Link to comment Share on other sites More sharing options...
doa24uk Posted October 1, 2009 Share Posted October 1, 2009 That code seems fine, try disabling all other firefox addons & re-running it .... somethings making it execute 3 times & since the primary difference between the 2 browsers is addons my money would be on that as the cause. Quote Link to comment Share on other sites More sharing options...
noj75 Posted October 1, 2009 Author Share Posted October 1, 2009 Thats just it, I dont have any addons on my FF installation. Quote Link to comment Share on other sites More sharing options...
noj75 Posted October 1, 2009 Author Share Posted October 1, 2009 Problem solved. I changed the modal to Ajax rather than iFrame and turned off cache. Works a treat now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.