Updating option_name
to option_name
will have no effect. You can use the VALUES
syntax to update to the value from the insert:
INSERT INTO wp_options (option_name, option_value, autoload) VALUES
(
'category_children',
'a value',
'yes'
),
(
'test_options',
'testing',
'yes'
)
ON DUPLICATE KEY UPDATE
option_name=VALUES(option_name),
option_value=VALUES(option_value),
autoload=VALUES(autoload)
;