Re: Mysql Trigger Error
You miss some SET statements -
CREATE TRIGGER hinewplayertableTrig BEFORE INSERT ON hinewplayertable
FOR EACH ROW
BEGIN
DECLARE tableT INTEGER;
DECLARE seatS INTEGER;
SELECT idTable, idSeat INTO tableT, seatS FROM hinewplayertable
WHERE idPlace = (SELECT MAX(idPlace) FROM hinewplayertable);
IF (seatS = 10) THEN
SET new.idSeat = 1;
SET new.idTable = table + 1; -- what is table?
ELSE
SET new.idSeat = seat + 1; -- what is seat?
SET new.idTable = table; -- what is table?
END IF;
SET new.chips = 1500;
SET new.rank = 0;
END;
Devart Company,
MySQL management tools
http://www.devart.com/dbforge/mysql/
Subject
Views
Written By
Posted
3748
March 23, 2011 08:21AM
1456
March 23, 2011 08:35AM
Re: Mysql Trigger Error
1603
March 23, 2011 09:12AM
1580
March 23, 2011 09:16AM
1258
March 23, 2011 09:32AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.