I would recommend running the following code right after your query to see what’s happening:
exit( var_dump( $wpdb->last_query ) );
This should print the last query that hit your database. In cases like these, I usually will manually run such a query through phpMyAdmin to see if it runs without errors and to see if it even affects the database. Additionally, by seeing the query that was actually run, you may find problems in the query that results from your code. For instance, the query may not return any MySQL errors, but it could run a query that is different than you expect it to be. With this debug code, you’ll at least be able to see what it is and continue on the wonderful debug trail! Furthermore, you may want to explore more of the “Class Variables” (Codex Ref) for $wpdb
as they may help further troubleshoot your issue.
Related Posts:
- $wpdb->insert Database Error Duplicate Entry Error Logging
- How to disable the fatal error (WSOD) protection?
- Unable to locate WordPress Content directory (wp-content)
- Could not create directory /wp-content/upgrade/
- Getting the warning: Missing argument 2 for manage_posts_custom_column()?
- What log files does a WordPress installation write to?
- What is the best way to monitor PHP functions/executions?
- Notice: Use of undefined constant SCRIPT_DEBUG
- WordPress Redirecting to wp-admin/install.php
- How to use WP_Error $data argument?
- Is it possible to disable caching of an option when using w3 total cache?
- Error 310 too many redirects after switching domains
- How do I set up Debugging?
- Error Logs to Diagnose Error 500 in LAMP
- “Notice: Undefined index:” error when adding new content?
- What causes the “max_user_connections” warning on WordPress frontend?
- Recommend a guide to catching plugin errors, please?
- How to handle core code throwing notice on valid input?
- Trying to get property of non-object in wp-includes/capabilities.php
- WordPress home page doesn’t work, but other pages do. How to rectify?
- Unexpected Output: register_activation_hook with namespace
- WP Site Only Shows Javascript for Main Page
- File available but giving 404 in wordpress
- Only on 404 page, get notice: trying to get property of non-object on nonce
- In big trouble – Allowed memory size of 268435456 bytes exhausted
- PHP Warning : A non-numeric value encountered
- Wordpres debug.log PHP Notice: is_singular was called
- media_buttons_context is deprecated
- Warning: Declaration of QuietSkin::feedback error
- failed to open stream: No such file or directory
- Getting 403 Access Denied Error Message in new WordPress Post
- Unable To Login With Correct Credentials?
- update user information
- is_wp_error() and handling errors
- My wordpress site loads perfectly, but I cannot access the menus in the admin panel
- Call to undefined function wp_embed_register_handler()
- Site works fine, but editing page causes error “Call to undefined function _wp_array_get()” in Gutenberg
- Error! 401.shtml file not found, what’s the problem?
- Error wordpress “Call to undefined function aq_resize()” [closed]
- Strange glyphs code error
- Custom slider throwing an error
- err_connection_closed after 20 minutes when loggedin in backend
- Handle new created WP_Error
- How to Fix “Are You Sure You Want to Do This”, while uploading my theme?
- 4.2.2 stuck in an db upgrade loop with “Call to undefined method wpdb::get_col_length()”
- Cannot redeclare maybe_create_table()
- Two Domain pointing to the same WordPress installation
- “Cannot modify header information” means I can’t use wp_redirect
- Debugging: How to determine which plugin is throwing error in plugin.php
- How can I use wordpress functionality outside of WP framework
- Errors in Add Image Popup, Media Library Tab: “in_array() expects parameter 2 to be array, null given in wp-includes/query.php”
- hypanis.ru wordpress vulnerabilty [closed]
- Problem in using wpdb
- Child Theme Fatal Error [closed]
- Jetpack could not contact wordpress [closed]
- White Screen on Site but wp-admin OK
- Internet Explorer cannot display the webpage
- Problem with UTF8. italian/russian characters
- Internal Server Error only on frontend and certain admin pages
- How to automatically convert “%” and “+” in image urls on upload
- Failed to import “File name”: Invalid post type jetpack-portfolio
- Fatal error: Uncaught Error: Call to undefined function wp() in /home/nr4dxonhypyy/public_html/wp-blog-header.php:16
- Error call_user_func_array() After Installing Plugin
- Error 500 when installing WordPress
- Why I get a blank screen when trying to make wordpress post/pages edits?
- Warning: call_user_func_array()
- Getting Download failed. cURL error 28: Connection timed out after 10001 milliseconds
- “File not found.” appears often while navigating wp-admin
- WordPress Error blank page In section website
- Posts, pages and some images are deleted sometimes
- Call to undefined function wordpress listing_categories
- how do i fix these errors my debug log gave me?
- Undefined index when saved to options
- Fatal error: Call to undefined function wp_add_privacy_policy_content() in /wp-admin/includes/misc.php on line 1822
- Unable to customize themes in wordpress after migrating to https from http
- A SINGLE Post Giving an “Under Maintenance” Message
- Weird Cron Error
- Error messages generated in ‘Customize Your Site’
- Overcome illegal characters [duplicate]
- Undefined Index. But isset not working?
- bypassing permission error for a plugin’s page
- Website Loading Very Slow, Each Time Different File Takes Very Long To Load
- Fatal error: Allowed memory size of bytes exhausted (tried to allocate 36 bytes)
- Any idea on how to fix this error when forcing SSL on a certain page?
- Internal 500 error: Activating rootio theme and deploying with capistrano
- warnings & errors after MAMP to live (hosteurope)
- Random HTTP 500 error in WordPress
- Add clickable function in functions.php – parse error [closed]
- Trying to add function with pre_get_posts for plugin search [closed]
- What are some best practices to clean up http mix content warnings?
- Fatal error due to file permissions
- undefined index [closed]
- WordPress is not sending the 2nd email in the same request
- Is it possible to empty debug.log programmatically?
- File doesn’t exist! in wordpress function.php file while creating new post or page
- Change Registration Error Message
- Error code 499 on specific cron job
- Please Help Me, How to Fix PHP Error Undefined Array Key “srcset”
- Customizing login message
- 403 forbidden in admin console: fix seems to be temporary and then error is back