Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Register your account to receive email notifications when new services and mods are added.


This forum is now closed and has moved to a new location! Click here to find out why.

AuthorTopic: Sql Help  (Read 341 times)

kingdkknox

  • Basic Member
  • *
  • Reputation Power: 30
  • kingdkknox has no influence.
  • Offline Offline
  • Posts: 25
    • View Profile
    • WWW
Sql Help
« on: June 11, 2010, 07:23:57 AM »
Im trying to reduce users stats and I need to exclude users that have 10 or less in a stat... how do I do that I tried

Code: [Select]
UPDATE `userstats` SET `strength`=((`strength`/100)*10) >10; but it didn't work mess the stats up everything went to 0.
Logged
If you are for hire or if you want to find some work it can be found here.
Freelance work at home jobs

kingdkknox

  • Basic Member
  • *
  • Reputation Power: 30
  • kingdkknox has no influence.
  • Offline Offline
  • Posts: 25
    • View Profile
    • WWW
Re: Sql Help
« Reply #1 on: June 11, 2010, 08:25:05 AM »
Figured it out
just had to add
WHERE strength >10
Code: [Select]
UPDATE `userstats` SET `strength`=((`strength`/100)*10) WHERE strength >10;
Logged
If you are for hire or if you want to find some work it can be found here.
Freelance work at home jobs

Cronus

  • Administrator
  • Senior Member
  • *****
  • Reputation Power: 2901
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 550
    • MSN Messenger - preston__08@hotmail.com
    • View Profile
    • WWW
Re: Sql Help
« Reply #2 on: June 14, 2010, 09:55:31 AM »
Glad you figured it out, topic locked =)
Logged
My msn is preston__08@hotmail.com if anyone is interested, I am online frequently.
 


This forum is now closed and has moved to a new location! Click here to find out why.