I am using wpdb update method and wish to update records where the id is not found within multiple ids.
So if I wanted to update records where each had an id of 1
I would do for example:
$wpdb->update(
'wp_my_tables',
array(
'active' => 0
),
array( 'id' => 1 ),
array(
'%d'
),
array( '%d' )
);
But how would I edit that so it does NOT update values where the ids are for example 1,2,3
?
You can run a generic query using
$wpdb->query()
and this might be easier in this case.