This topic is locked

Copy Child Records with Master Record Follow Up Questions

4/13/2022 5:24:13 PM
PHPRunner General questions
J
jacktonghk authorDevClub member

I tried the code from https://asprunner.com/forums/topic/8707-copying-child-records. It works for one table but the same codes doesn't work for another table. Is there anything related to 'copyid1'? Is it always 'copyid1'? Thanks.

K
kohle 4/14/2022

Hi,
I use db::insert for making copies. I work with autoincrement id .
When I copy the master record I use db::lastID for getting the autoincremt ID
https://xlinesoft.com/phprunner/docs/db_lastid.htm
This ID I need to add the details records
https://xlinesoft.com/phprunner/docs/db_insert.htm

rgs
J.