Increment integer field in database when WHERE needs to be dynamic

I have a database column called “upvotes”. I have another column called “userid”. I would like to increment the value in the “updates” column where the userid matches the dynamic variable I’m providing. Here’s my attempt: $results = $wpdb->query("UPDATE points SET upvotes = upvotes + 1 WHERE userid= %d", $theDynamicUserID); That is giving the following … Read more