Jump to content
MakeWebGames

Recommended Posts

Posted
UPDATE users SET crystals=1 WHERE crystals <=6050 AND =>4000

 

basically, when I was starting my game and stuff and I gave mass payments of like 5000, 1000, 250, etc. and some people used a few crystals, then stopped playing (100+ days ago last movement). So I want to make it so if someone has inbetween 6050 crystals and 4000 (nobody has it who is active) then it will set their crystals to 1.

I use the code above and it says:

 

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 55

STR: =>

SQL: UPDATE users SET crystals=1 WHERE crystals <=6050 AND =>4000

 

SQL query:

UPDATE users SET crystals=1 WHERE crystals <=6050 AND =>4000

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=>4000' at line 1

Posted

Re: PHPMYADMIN query

So simple...I suck at SQL, thought it would use the MCcodes query format.

+1 for this, thanks, and delete topic when a mod sees this. Thanks again

Posted

Re: PHPMYADMIN query

lol the problem is that most of people around uses SQL statements as they have seen it (limited to 4 or 5). So why bother using more? ;)

you could also use it as a "regular query format" as you call it!

UPDATE users SET crystals=1 WHERE crystals>4000 AND crystals<6050

though using BETWEEN is faster ;)

Posted

Re: PHPMYADMIN query

 

So simple...I suck at SQL, thought it would use the MCcodes query format.

+1 for this, thanks, and delete topic when a mod sees this. Thanks again

No point deleting it. It could a help a lot more people who might be having the same issues as you have just had. However, most people cant be bothered reading through old posts for help and they just resort to creating a new topic. Oh well

Join the conversation

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

Guest
Reply to this topic...

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