Jump to content
  • 0

Little help with query_sql please


Question

Posted
    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.

2 answers to this question

Recommended Posts

  • 0
Posted
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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...