02.11.2011, 19:13
Hello. I want to do a conditional instructions with a SELECT FOR UPDATE. My query looks like this:
And here I have a question how to develop the condition if the player has a duty == 0 then set on duty == 1 and vice versa?
//EDIT:
I tried with:
but it does not work
pawn Код:
SELECT `Duty` FROM `Employees` WHERE `UID` = '1' FOR UPDATE;
UPDATE `Employees` SET `Duty`
//EDIT:
I tried with:
pawn Код:
UPDATE `Employees` IF(`Duty` == '1' SET `Duty` = '0' OR `Duty` == '0' SET `Duty` = '1')