Re: My first trigger in MySQL

2007-10-08 Thread Martijn Tonies
Hi, > I tried this : > CREATE TRIGGER username_check AFTER UPDATE ON `users` > FOR EACH ROW > UPDATE users SET users.username = concat(users.firstname," > ",users.lastname) where users.id=NEW.id; > END > ; > > But it throws the error: > > "Can't update table 'users' in stored function/trigger

Re: My first trigger in MySQL

2007-10-07 Thread Baron Schwartz
Hi, Steffan A. Cline wrote: on 10/7/07 12:26 PM, Steffan A. Cline at [EMAIL PROTECTED] wrote: I am new to triggers and am trying to figure this out. The goal I have is to set it up so that after a row in the users table is updated it will check to see if the affected row has a username in the

Re: My first trigger in MySQL

2007-10-07 Thread Steffan A. Cline
on 10/7/07 12:26 PM, Steffan A. Cline at [EMAIL PROTECTED] wrote: > I am new to triggers and am trying to figure this out. The goal I have is to > set it up so that after a row in the users table is updated it will check to > see if the affected row has a username in the username field and if not