I have this query where I want to insert into table exp_channel_data data from the table homes but it inserts 7 and 8 entries and then returns the error:
[Err] 1062 – Duplicate entry ‘8’ for key ‘PRIMARY’
This is my query (I reduced the fields to be readable):
INSERT INTO exp_channel_data (entry_id,site_id,channel_id,field_id_1) SELECT 7,1,1,summary FROM homes ON DUPLICATE KEY UPDATE entry_id = entry_id+1
If you want to copy all your
homestable data into the new one: