Jump to content
  • 0

Little help with query_sql please


Moooooon-Aisha

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   18
  • Joined:  09/08/17
  • Last Seen:  

    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

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

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

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   18
  • Joined:  09/08/17
  • Last Seen:  

Thanks, I typed it with an extra 0 in there, it should all be within the 400,000 range. Thank you very much!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...