Consider database triggers.
I recommend using database trigger for REALLY simple situations that involve
no more then 3 line of code.

In you example pseudo code should looks something like this.
After update trigger on competitions .
#If NEW.complete == yes
#Select awardpoints into new_points from competitions
#Update users set points = new_points where id = user_id;

Its better to call stored procedures from within the trigger to do the job.

For more complicated situations create a stored procedure in the database
and call this procedure from your model aftersave();

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to