This query is valid:
$player_id = $_POST['player_id'];//array $ids = explode(',',$player_id); $in = implode(',', array_fill(0, count($ids), '%d')); $wpdb->query($wpdb->prepare("DELETE FROM {$player_table} WHERE id IN ($in)", $ids));
This won’t:
$disabled = $_POST['disabled']; $media_id = $_POST['media_id'];//array $ids = explode(',',$media_id); $in = implode(',', array_fill(0, count($ids), '%d')); $wpdb->query($wpdb->prepare("UPDATE {$media_table} SET disabled = %s WHERE id IN ($in)", $disabled, $ids));
I do not understand why.
You need to scatter the IDS into separate parameters to match all
%s
in the query. Use...
syntax to achieve this.