INSERT ON DUPLICATE KEY UPDATE failes in postmeta table
By doing a SHOW CREATE TABLE on wp_postmeta, I got the structure of that table which included this: PRIMARY KEY (`meta_id`), So the key that MySQL can do the ‘insert or update’ on is the meta_id, which you’re not providing. Therefore in your query, it will always be added as a new row. EDIT: The … Read more