The following script will help you to identify if there any error exists in the query.
$wpdb -> show_errors ();
$call_post_id_call = $wpdb->get_results($wpdb->prepare($post_id_query));
$wpdb -> print_error ();
Related Posts:
- Return only Count from a wp_query request?
- How to make an activities stream mixing posts and comments?
- How To Get Some Data From WordPress Database Using WordPress $wpdb Query?
- How to correctly pass values to wpdb->prepare()?
- Custom Query num_rows returns wrong amount
- Iterating through $wpdb query without using get_results for large query results
- WordPress query posts with multiple post_meta data
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- Any way to use FETCH_KEY_PAIR with $wpdb?
- wpdb get_results() returns only 2 rows
- How much does $wpdb->prepare(), then $wpdb->query() VS straight $wpdb->query(), can slow down the load time of whole page
- how to use transient method?
- When should you use WP_Query vs query_posts() vs get_posts()?
- How to print the excuted sql right after its execution
- order by numeric value for meta value
- Wp get all the sub pages of the parent using wp query
- Pagination with custom SQL query
- How to query for most viewed posts and show top 5
- WP_Query vs get_posts
- WP_Comment_Query pagination, delving into the unknown
- Usage of the new “posts_clauses” filter in WordPress 3.1?
- Make a WP Query search match exactly the search term
- WP_Query: query posts by ids from array?
- Changing the meta_query of the main query based on custom query_vars and using pre_get_posts
- Sort posts by category name and title
- how does $wpdb differ to WP_Query?
- How to uniquely identify queries?
- What is the most efficient way of querying posts based on visits and date for current day?
- Custom WP_Query order by post_meta and (author) user_meta
- Query WooCommerce orders where meta data does not exist
- WP_Query for WooCommerce Products
- pre_get_posts with get_posts
- Is it true $wpdb->get_results is faster than WP_Query in most cases?
- Query causing load because of SQL_CALC_FOUND_ROWS post counting?
- author.php with ACF and CPTs
- Query Custom Meta Value with Increment
- Export wordpress table to excel
- When should you use wp_reset_postdata vs wp_reset_query?
- Get posts by meta data OR title
- Use WP_Query with a custom SQL query
- Identify which loop you are hooking into; primary or secondary?
- Perform query with meta_value date
- WP_Query ordered by custom field that is a date string?
- Duplicate Queries
- How to query for a week using key => value WP_Query argument notation?
- Finding all results from database within 500 miles of the given latitude and longitude [closed]
- Show only oldest post by author
- Order posts by tags count?
- How can I connect to another WP database and use WP_Query?
- SQL query equivalent to WP User Query
- Add and in the header while looping over custom query in page template
- How to get the posts published in last two days using WP_Query?
- Highlighting Sub topic in a post?
- Which custom query am I in and how can I access its properties & methods?
- How to count post type that has a particular term?
- Finding the next 5 posts
- how to retrieve specific product attribute value in an sql query?
- Get number of comments after modifying comment query
- How to change a custom query into a standard loop?
- Dynamically Override Fancy Title – Part II
- Transient pagination not working properly
- Foreach-generated custom tax queries, each with an ajax “Load more” button
- Can not switch the queried post in pre_get_posts hook
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- view queries made?
- meta_query on a date range using an array of values
- WP_Query Performance Issues with meta_query
- WordPress custom archive page
- Should close $wpdb via $wpdb->close()
- How to speed up wp_query, took more 5s to run against 100k posts
- WP_query category__in not working, only pulls from first category
- How to detect custom query inside `posts_where` hook?
- Pass the same object to multiple widgets in a template with one query
- Is temporarily overwriting $wp_query a bad idea?
- Get the post permalink within the loop but without additional DB query
- Query Set Order By Author
- List the 5 most recent child pages
- Splitting the main query in multiple loops with query_posts and/or pre_get_posts?
- Retrieve or Query Pages by ID
- How do you query wordpress posts using a math formula between multiple meta field values?
- $wpdb->insert inserting two rows in database
- Custom Post order for homepage
- How to implement time filter to show random post 1 month for one category and 3 months for other categories
- Get image of latest post from taxonomies/categories
- How to output different posts per page?
- Get the Plugin Which Triggered a MySql Query in WordPress?
- How to do a query on custom taxonomies that is uncategorised?
- Page navigation doesn’t show when query category
- Detect featured image among the attached images
- Undefined WP_Query::has_posts()?
- Is it possible to dynamically get queried term AND taxonomy?
- How would I format a query that depends on post parent taxonomy
- Empty tax_query array returns an empty array
- Meta Query for specific months
- What is considered a default query for the request filter?
- Mysql query LIKE not working
- How do I search inside specific taxonomies in WordPress
- Create ONE callback for all page templates, post filter queries + paginated pages, triggering pagination via AJAX
- $wpdb insert is not work
- Pass array of taxonomy terms to wp_query