MySQL Forums
Forum List  »  Triggers

Trigger reference table error
Posted by: Luis Gasca
Date: September 13, 2005 01:08PM

Using 5.0.12 (windows)

Referencing a table within the trigger fails, although it is supposed to be working from 5.0.10

example:

create trigger counters before update on mt
for each row
begin
DECLARE xidg integer;

SELECT idg INTO xidg FROM mt_group WHERE pkfield=NEW.route
SET NEW.idg = xidg;
end//

NEW.idg contains NULL.

I have also tried with user (@) variables. Same result.

Any hints ?
Thanks
luis

Options: ReplyQuote


Subject
Views
Written By
Posted
Trigger reference table error
3340
September 13, 2005 01:08PM
2197
September 14, 2005 04:20PM
2046
September 15, 2005 02:19AM
2152
September 15, 2005 02:28AM
2124
September 15, 2005 09:28AM


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.