Try removing the $wpdb->prepare
.
$wpdb->query("UPDATE wp_postmeta SET meta_value = meta_value - 1 WHERE post_id= 9999 AND meta_key = 'point_user'");
Related Posts:
- Differences between wpdb->get_results() and wpdb->query()
- How to Use Wildcards in $wpdb Queries Using $wpdb->get_results & $wpdb->prepare?
- wpdb get posts by taxonomy SQL
- Multipart/formatted MySQL query problem
- Custom $wpdb Query for Custom Post Type by Category
- Can’t pass table to $wpdb->prepare
- $wpdb->get_var not returning a result
- Most effective use of DB querys
- $wpdb->query() vs. $wpdb->get_results() vs. phpMyAdmin
- wpdb::prepare() isn’t working
- $wpdb doesn’t appear to work on page inside of a plugin
- Strange string in console from wpdb query
- Using $wpdb->update but confused on the WHERE in and SET
- What’s wrong with my $wpdb prepare?
- Make one query for adding entries to database
- How to execute a SQL-query which contains multiple queries using $wpdb->query?
- Alter a specific query on WordPress
- wpdb->term_taxonomy count posts from both published and private posts?
- wpdb print all post meta
- Plugin will sort users by usermeta
- wpdb query problem to access previous 3 days posts
- How to write: $wpdb->update having WHERE NOT value pair in the array
- I can’t figure out what’s wrong with this statement. $wpdb->query update
- Use mysql_query instead of $wpdb query
- wpdb COALESCE won’t work
- Custom Query – Based on user input
- Custom SQL Query passing array to WHERE p.id
- Get posts from category with custom query
- Custom Query returns array, but I can’t see it’s elements
- Valid SQL query return empty
- mysql query – how to escape apostrophe?
- $wpdb->prepare affecting the query?
- prepare function sql safe method
- Updating with $qpdb->query() always returns 0 rows affected
- How to return count of custom post type posts with a specific custom field value via $wpdb?
- WordPress Mysql query and Duplicate
- How do I query for posts by custom meta and those that have been stickied?
- Help with Related Posts Function
- wpdb update multiple row?
- Formatting a date/time returned from a custom $wpdb query
- Improve performance of slow query
- How do I get specific readable results from this query and array results
- implementing my wp_query using $wpdb class
- Exclude Posts from a Widget
- Fastest and most efficient SQL query to check if UID exists
- Use $wpdb->get_results with filter based on array
- $wpdb query for price in custom field value
- Display result from custom post meta query
- Wpdb empty result only if language is Russian
- Run an update query in a function
- How to fix this insert? Don’t work for me!
- Problem on wpdb queries, wp_insert_post, wp_insert_user etc. The query runs twice
- Update vs Insert logic but the last key is always inserted?
- There is way to improve this query? wordpress get post data and some meta data
- $wpdb: how to use a query as a base for another query?
- Wpdb generates too many queries
- Custom Query for searching through custom fields
- Mysql query and odd results
- How to reference same column name but different table in custom db query
- Retrieving custom field array value through db query
- How to get one result using wpdb class?
- Delete query won’t run
- How can I create a meta_query with an array as meta_field?
- Query multiple meta key values?
- Is there a way of increasing the speed of this query?
- Reversing the order of posts AFTER the query is performed
- what are the numbers between curly brackets in search query
- When/why does ‘$query->get( ‘tax_query’ );’ return empty?
- How to get link and title of next and previous post on single page
- Remove [gallery] shortcode altogether
- How to make an activities stream mixing posts and comments?
- query multiple taxonomy and show post count
- add_query_arg() XSS Vulnerability
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Change searched term
- Query Posts By Post Publish Date, but sort by Custom Meta Key
- Echo a hierarchical list of post data from custom fields
- Why a URL with a query is always slower than that without a query?
- Maintaining Queries in URL
- wpdb php get_var query to get ID for URL image doesn’t work for ID over 999
- Modify users.php query with multiple taxonomies
- MySql Query very slow
- Connecting to a different database
- Query Column of Specific ID from Database Table
- Random Page Rewrite
- How to pull posts into two columns with different image sizes using $counter variable?
- How to “orderby” the first array in a meta_query that uses multiply keys?
- Order posts ascending from posts in array
- Display data from phpMyAdmin with WordPress
- custom sorting media with multiple filters – error: not unique table/alias: wp_postmeta
- How can I get posts by 2 meta keys, prioritising one of them?
- SQL query to list all posts of specific post type with a specific set of associated postmeta values as a column
- Category_in return empty
- modifying main query to query for ranges e.g. from 1999 to 2016
- Querying users by meta value and getting a strange answer
- Multilingual WordPress page – using URL to determine language?
- Retrieve post data via WPDB class
- WP_Query with checkbox meta_query – WordPress [duplicate]
- What is the best way to cache pages and queries in WordPress?
- How to show sticky posts on all pages of the pagination, not just the first page?