https://stackoverflow.com/questions/23516958/on-duplicate-key-auto-increment-issue-mysql ON DUPLICATE KEY + AUTO INCREMENT issue mysql I have table structure like this when I insert row to the table I'm using this query: INSERT INTO table_blah ( material_item, ... hidden ) VALUES ( data, ... data ) ON DUPLICATE KEY UPDATE id = id, stackoverflow.com