I need to update 2 row in wordpress sql database, I need change option_name 'stylesheet' value to 'twentyfifteen' and change option_name 'template' value to 'twentyfifteen'
This code is working:
global $wpdb;
$wpdb->query(" UPDATE $wpdb->options SET option_value = 'twentyfifteen' WHERE option_name = 'template' ");
$wpdb->query(" UPDATE $wpdb->options SET option_value = 'twentyfifteen' WHERE option_name = 'stylesheet' ");
But I need it in one line, like this but not working with me:
global $wpdb;
$wpdb->query(" UPDATE $wpdb->options SET option_value = 'twentyfifteen' WHERE option_name = 'template',
UPDATE $wpdb->options SET option_value = 'twentyfifteen' WHERE option_name = 'stylesheet' ");