Ok, I have done the UPDATE RULE like this and works!
[code]
update atau_utilizadores
set group_id = NEW.group_id,
password = NEW.password,
salt = NEW.salt,
email = NEW.email,
activation_code = NEW.activation_code,
forgotten_password_code = NEW.forgotten_password_code,
remember_code =
On Tue, Jul 06, 2010 at 12:28:35PM +0100, Andre Lopes wrote:
Ok, I have done the UPDATE RULE like this and works!
where
(id = OLD.id or username = OLD.username or email = OLD.email)
I'm pretty sure you just want to be using the id column above. Using an
OR expression as you're doing could
Hi,
Thanks for the reply.
In the application there are two kinds of UPDATES to this table.
[code]
update aau_utilizadores
set group_id = 3
where email = pEMAIL;
[/code]
and
[code]
update aau_utilizadores
set password = 3
where id = pNEWPASSWORD;
On Tue, Jul 06, 2010 at 12:55:22PM +0100, Andre Lopes wrote:
update aau_utilizadores
set group_id = 3
where email = pEMAIL;
[..]
If I use the clause WHERE only in id will not work fot both cases, or will
work?
Yes, it'll do the right thing. OLD always refers to the