MySQL Forums
Forum List  »  Triggers

Mysql Trigger Error
Posted by: Stopka Miroslav
Date: March 23, 2011 08:21AM

Can you help me? Im trying create trigger but it signal error. Thanks

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
new.idSeat = 1;
new.idTable = table + 1;
else
new.idSeat = seat + 1;
new.idTable = table;
end if;
new.chips = 1500;
new.rank = 0;
end;

Options: ReplyQuote


Subject
Views
Written By
Posted
Mysql Trigger Error
3337
March 23, 2011 08:21AM
1250
March 23, 2011 08:35AM
1402
March 23, 2011 09:12AM
1394
March 23, 2011 09:16AM
1081
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.