Inserting records with triggers

A place for users and developers of the Xataface to discuss and receive support.

Inserting records with triggers

Postby Byrhtwulf72 » Wed Feb 22, 2012 12:27 pm

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?
Byrhtwulf72
 
Posts: 9
Joined: Wed Feb 22, 2012 12:24 pm

Re: Inserting records with triggers

Postby shannah » Wed Feb 22, 2012 12:32 pm

Yes. Use beforeInsert() or afterInsert()

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

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 29 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved