PDA

View Full Version : mySQL question


Dolby
06-07-2003, 11:14 PM
In my user table I have an added field called "donator". When the value equals 1 they are a donator (installed the basic donation hack). I now want to put these people in there own user group witch will be user group 12.

What would the mySQL quire be to alter the user group to 12 for all users that have a 1 in the donator field?

I know it would start with something like:

ALTER TABLE user WHERE donator=1 ......or somthing :)

Thank you in advance for your help.

Xenon
06-08-2003, 09:24 AM
UPDATE user SET usergroupid=12 WHERE donator=1 and usergroupid=2

that will move all donating users from registred into 12

Dolby
06-08-2003, 01:59 PM
Thank you very much Xenon! :)

Xenon
06-08-2003, 10:35 PM
you're welcome