Using the INSERT command to another table in AfterSave()
Posted: Fri Jan 13, 2012 7:25 am
Hello,
I have two tables. Table1 contains some standard text fields and a text field for place holding the name of the file upload (field name: NL_photo). Table2 is a table associated with Table1 for additional photos using the relationships.ini in Table1. All works well. However, I have a particular request like this...
When a user enters a new row in Table1, the file upload field (NL_photo) is also inserted to Table2 as well (T2_photos). To do this, I was going to write some form of "INSERT" query to Table2 in Table1's Delagate class in function AfterSave. However, I do not know the list of commands I can use to call an INSERT command to another table. Can you lead me to the online documentation explaining this? Basically I need access to the DB commands I can use in the table's Delagate class functions.
Thanks.
Best,
Frank
I have two tables. Table1 contains some standard text fields and a text field for place holding the name of the file upload (field name: NL_photo). Table2 is a table associated with Table1 for additional photos using the relationships.ini in Table1. All works well. However, I have a particular request like this...
When a user enters a new row in Table1, the file upload field (NL_photo) is also inserted to Table2 as well (T2_photos). To do this, I was going to write some form of "INSERT" query to Table2 in Table1's Delagate class in function AfterSave. However, I do not know the list of commands I can use to call an INSERT command to another table. Can you lead me to the online documentation explaining this? Basically I need access to the DB commands I can use in the table's Delagate class functions.
Thanks.
Best,
Frank