Unknown on duplicate key update error
ON DUPLICATE KEY only works when constraint violation. In this cases no constraint will be violated because the primary key is auto incremented column, so you have to add one unique key constraint in your table.