How would I go about duplicating records in a database with server connect (php)
i have sc query on my page… with repeat region.
id id_to_duplicate name
1 4 name1
2 4 name2
3 4 name3
4 4 name4
and then with a server connect action looking for all id_to_duplicate (4) to copy and “duplicate” as (presuming the new id_to_duplicate would now be 5)
id id_to_duplicate name
5 5 name1
6 5 name2
7 5 name3
8 5 name4
What would be the best solution be to do this? Query the database… with a repeat? Check for the id_to_duplicate (4) … then copy the values and insert it again as a new record with id_to_duplicate (5)
I cannot understand… Please give a few more details:
You have 1 table “NAMES” with fields(columns):
id,
id_to_dublicate
name1
name2
name3
name4
And you want to duplicate the records (let’s say Where id=1 ),inside the same table or into another table?
Which fields should be changed and based on which condition?
Probably you understand because you know what you have and what you want to do but I am sorry I got confused…