Moooooon-Aisha Posted February 5, 2023 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 116 Reputation: 19 Joined: 09/08/17 Last Seen: April 13, 2023 Share Posted February 5, 2023 for(.@i = 0; .@i <= 38; .@i++) query_sql("DELETE FROM `achievement` WHERE `achievement`.`id` = 40000"+.@i+";" I am currently using this code to reset my achievements, is there any other way to avoid using multiple query_sql (since its a loop) Thanks. I'm using this to manipulate offline player data. Quote Link to comment Share on other sites More sharing options...
0 Litro Endemic Posted February 5, 2023 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 283 Reputation: 79 Joined: 06/13/13 Last Seen: June 7, 2023 Share Posted February 5, 2023 DELETE FROM `achievement` WHERE `achievement`.`id` >= '400000' AND id <= '4000038'; is it me or there is really wrong number in the loop. concated value become like this: lower bound 40000+0 = 400.000, then upper bound 40000+38 = 4.000.038 1 Quote Link to comment Share on other sites More sharing options...
0 Moooooon-Aisha Posted February 6, 2023 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 116 Reputation: 19 Joined: 09/08/17 Last Seen: April 13, 2023 Author Share Posted February 6, 2023 Thanks, I typed it with an extra 0 in there, it should all be within the 400,000 range. Thank you very much! Quote Link to comment Share on other sites More sharing options...
Question
Moooooon-Aisha
for(.@i = 0; .@i <= 38; .@i++) query_sql("DELETE FROM `achievement` WHERE `achievement`.`id` = 40000"+.@i+";"
I am currently using this code to reset my achievements, is there any other way to avoid using multiple query_sql (since its a loop)
Thanks. I'm using this to manipulate offline player data.
Link to comment
Share on other sites
2 answers to this question
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.