My trigger looks like this:
begin
IF ((NEW.tgebucht >= NEW.tteilnmax) AND (NEW.tgebucht!=0) AND (OLD.tstatus=0)) THEN
SET NEW.tstatus = 1;
ELSEIF ((NEW.tgebucht < NEW.tteilnmax) AND (OLD.tstatus=1)) THEN
SET NEW.tstatus =0;
END IF;
IF ((0,25*NEW.tteilnmax)>=(NEW.tteilnmax-NEW.tgebucht)) THEN
SET NEW.trestplatze =1;
END IF;
end
And I am getting an error like this:
Operand should contain 2 column(s)
I am not really sure why, I know it is related to second if but I can't configure where, does anyone has an idea what to change? Am I doing something wrong here? Any help would be appreciated.