I have a query that allows me to update the meta_value of my meta_key 'post_view_count' - for all my posts:
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_value = %d WHERE meta_key = %s", 0, 'post_views_count' ) );
The problem is that the query updates all meta_value's of all my posts.
I've been looking for a way to update the meta_value of meta_key 'post_view_count' of posts present in the taxonomy 'cars' and whose term of this taxonomy is 'blue'.
That way I can avoid updating the 'post_view_count' of 'red' (term) 'cars' (taxonomy), for example.
I am quite sure that I know the answer and I know for sure what you've been doing wrong in any way (look at my profile for my previous work), but I can't work for such a low, almost non-existing reward, if you want to increase it I can help you.