I want to make a script that moves one row from one table to another table when this is been done I want the ID to change and use the new one in the new table.
Because at the moment when I move the row from one table to another table it says duplicate ID as it was already used but now is deleted.
One table is main table the other is archive, when I click restore from the PHP script it will move the archive back to the main database.
Tables
<---Main Database---> <---Archive--->
ID ID
Title Title
if ID in archive is 127 but I have created a new record in the Main Database after archiving it it can not be restored as the ID 127 is in use by the main database. resulting in the Duplicate ID issue.