Kryptix Posted October 27, 2009 Share Posted October 27, 2009 I run a online game which uses MySQL to store everything. The players 'Hits' (health) is calculated by the experience in 4 other stats divided by 3. However, some players have found a way to not gain 'Hits' (health) which gives them an advantage, believe it or not. We have fixed the bug but now need to update the database with the new information. The table is called 'rscd_experience' In the table we have a field called 'user' which is a hashed username, followed by 'exp_attack', 'exp_defense', 'exp_strength' and 'exp_hits' exp_attack + exp_defense + exp_strength / 4 = exp_hits At the moment I have 6,520 rows in this table. What would be the best way to do this? Is there a direct query possible or would I need PHP? Quote Link to comment https://forums.phpfreaks.com/topic/179248-query-help-needed/ Share on other sites More sharing options...
monkeybidz Posted October 28, 2009 Share Posted October 28, 2009 Looks like they are just passing the var exp_hits by just adding it on the URL text field. Example http://www.yoursite.com/level1.php?&exp_hits=0 For this you will need to somehow not let just anyone define the Vars. Quote Link to comment https://forums.phpfreaks.com/topic/179248-query-help-needed/#findComment-946139 Share on other sites More sharing options...
Kryptix Posted October 28, 2009 Author Share Posted October 28, 2009 No, this isn't web-based. The 'bug' was my mistake. It's a online JAVA RPG that uses a database to store data. Anyway, regardless how it happened, I need to fix it but I don't know how without going through them one-by-one. Quote Link to comment https://forums.phpfreaks.com/topic/179248-query-help-needed/#findComment-946143 Share on other sites More sharing options...
Kryptix Posted October 29, 2009 Author Share Posted October 29, 2009 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/179248-query-help-needed/#findComment-947395 Share on other sites More sharing options...
fenway Posted November 14, 2009 Share Posted November 14, 2009 Sounds like a simple update statement should work. Quote Link to comment https://forums.phpfreaks.com/topic/179248-query-help-needed/#findComment-957414 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.