Get WordPress SQL query details
When I debug WordPress, getting SQL query details is useful in some situations.
In the WordPress plugin repo, we can find some nice debug plugins to get query details. Also, we can use default WordPress options to get query details.
First, we need to add a definition in our
The SAVEQUERIES definition saves the database queries to an array and we can use that array to analyze those queries.
The array is stored in the global
Print last SQL query string
Print last SQL query result
Print last SQL query Error
- Handle plugin activation hook in multisite & single site - WordPress
- Remove edit, view, trash and quick edit links within posts list of admin screen - WordPress
- PHP Errors not displaying or not logging - LAMP server - Solved
- Display all hooks sequentialy that run on a page - WordPress
- Get downloadable files of a downloadable product - WooCoomerce
Your Questions / Comments
If you found this article interesting, found errors, or just want to discuss about them, please get in touch.