Page 1 of 1

Inserting records with triggers

PostPosted: Wed Feb 22, 2012 12:27 pm
by Byrhtwulf72
I'm working on a project, and I'm trying to make it so that whenever I insert a record into a certain table, a new record is created in another table with information about the first one. Is there a way to do this with triggers?

Re: Inserting records with triggers

PostPosted: Wed Feb 22, 2012 12:32 pm
by shannah
Yes. Use beforeInsert() or afterInsert()

They work similar to the beforeSave() trigger except they only operate on insert.
http://xataface.com/wiki/beforeSave

-Steve