This topic is locked

Update Table 2 after Importing Data into Table 1

4/13/2023 7:13:56 AM
PHPRunner Tips and Tricks
CWDATA author

Is it possable to import new data into my Primary Table and then automatically update two selected columns from the Primary in a Second Table?
I realise that a Triger is an option but would like to do it from within PHPRunner if possible.
So Primary Table has 5 columns 1, 2, 3, 4 and 5. The Secondaty Table has 2 columns 1 and 2.
Import 5 columns into Primary Table
Update 1 and 2 in Secondary table from 1 And 2 in the Primary Table
Many thanks for reading.

admin 4/13/2023

You can use BeforeInsert event to execute some additional code when imported data record is about to be inserted into a database:
And in that event you can use Database API to insert a record into another table:

CWDATA author 4/14/2023

Thank you so much for your prompt reply