Just noticed that you are missing a prepare.
Your code should look like this
$results = $wpdb->query($wpdb->prepare('UPDATE points SET upvotes = upvotes + 1 WHERE userid= %d', $theDynamicUserID));
Related Posts:
- How to use $wpdb to delete in a custom table
- get_results on large datasets
- Is there a (better) way to access $wpdb results?
- Using $wpdb generates DB error
- How do you use prepare when asking for a list of id’s
- how to execute different sql query in non-sanitized $wpdb->get_results function
- WPDB update row with != in where clause
- How to update records using $wpdb?
- Need help writing a $wpdb query
- show badge with count for pending items in custom post type
- WP Sql query multiple where clause
- WordPress SQL query – returning ‘true’ ‘false’ or ‘null’
- Modify the structure of data returned by $wpdb
- Syntax for $wpdb->prepare when searching in two columns
- Confused by $wpdb->prepare
- How to display user_nicename and usermeta values by custom query in WordPress?
- Optimizing WordPress Queries – Removing Group By ID
- How can I combine one field using wpdb and group by?
- $wpdb->prepare with ON DUPLICATE KEY UPDATE
- how to use $wpdb->prepare to update a custom table
- WPDB Placeholders and second argument for prepared statements
- Custom SQL query ORDER BY term_order
- Custom $wpdb returns unexpected time based results
- How to left join meta in queries [closed]
- wpdb->get_row is selecting the variable as a column name
- CREATE TABLE with dbDelta does not create table
- $wpdb query outputs php code instead of executing it
- wpdb query not working
- WordPress wpdb->insert returns int(0) => doesn’t insert anything, no errors!
- WPDB SQL Ignore `post_status` Parameter
- how to list all post that are in the custom taxonomy using $wpdb
- WPDB SQL query SELECT from category
- How to use WHERE NOT EXISTS query to avoid duplicate entry using $wpdb to save in custom table?
- Creating an Angular factory from custom database table
- wpdb->update update the entire table instead of one row
- How do I update post based on meta_key in another table?
- How to set up prepared query using IN statement
- Custom database query to validate data
- Alter the main search query to search posts by coauthor user name
- Creates only one table and not the other
- Protect custom form from SQL injection
- looking for a way to allow users to backup the plugin db data(save as)
- SQL Query to select post title & post ID from a particular category
- Get comments after specific date
- query using wpdb in wordpress gets me no result
- Get count of rows based if column exists in two different tables
- query_vars doesn’t return query string (trying to get data from $wpdb)
- $wpdb->get_row() only returns a single row?
- what is the way to see the currently executing query in wordpress?
- $wpdb->last_error doesn’t show the query on error
- Multipart/formatted MySQL query problem
- How to make an activities stream mixing posts and comments?
- Delete/replace img tags in post content for auto published posts [closed]
- What does wp_update_post() do that the $wpdb class does not?
- wpdb-> not adding prefix to custom table
- WPDB: how to get the value of a field in a custom database table
- store custom WP table names in a global variable
- How to save html and text in the database?
- XOR functionality for meta_query
- How can I migrate mysql_fetch_array to $wbpdb?
- how to delete 30 day old data using PHP [closed]
- Return XML of Post Metadata
- Querying wpdb using PHP
- Problem in inserting row to custom database table
- sanitize_text_field and apostrophe problem
- Is there a WP function to get taxonomy name from taxonomy_term_id?
- wpdb query problem to access previous 3 days posts
- wpdb updating record in wordpress with json adds extra array elements
- I can’t figure out what’s wrong with this statement. $wpdb->query update
- How to display a specific category using a custom Query?
- AWS Bitnami WordPress – SELECT command denied to user
- PHP Fatal Error – $wpdb a non-object?
- How do I count columns on a custom WPDB query?
- Trouble inserting string containing quotations marks with wpdb in save_post hook
- How can I add a new row in a separate database when someone registers via WordPress?
- Clear Terms from Taxonomy for Specific Post IDs?
- $wpdb->insert() doesnt work anymore
- Where can I see MySQL hostname and port for wp-config.php
- $wpdb->get_results not returning an array
- WPDB Query Question with Category Only
- wpdb result arrray inside an array
- Fetching review value using wpdb class
- $wpdb->num_rows doesn’t work
- How can I change my meta_query to SQL wpdb query?
- Database SQL query error
- How capturate wpdb exceptions?
- Limit left join
- Get records from Formidable Table using $wpdb->get_col
- What argument does my function need to echo get_results() query results
- Missing argument 2 for wpdb::prepare() [duplicate]
- Save customizer default values to DB on theme activation
- Plugin with connection to database – Single function
- why nl2br() is adding an extra ?
- How to add more custom fields in user meta table simultaneously
- wpdb->update error
- Wpdb generates too many queries
- Using $wpdb to update current post
- DBDelta: “table doesn’t exist” for a table that was just created
- $wpdb The query does not contain the correct number of placeholders
- $wpdb:insert, more arguements in $format array than in $data