This topic is locked

Save old data record question

9/26/2020 5:27:10 AM
PHPRunner General questions
A
alfonso authorDevClub member

When adding a record in a form, we have performed these actions in Before Record Add:

  1. Check if specific record exists in other table different. OK

    1.1 If found, update record into the other table. OK

    1.2. If not found, insert record in the other table. OK
    I don't know if it is possible to make a previous copy of the record of the other table that is going to be updated in point 1.1. I don't know if it is possible to do with Save old data in another table

admin 9/30/2020

It may depend on what database do you use, for instance, in MySQL you can use INSERT INTO ... SELECT FROM statement.
More info:

https://stackoverflow.com/questions/1353733/mysql-how-to-copy-an-entire-row-from-one-table-to-another-in-mysql-with-the-sec