How to print the executed sql right after its execution?

Posted by Editorial Staff | Updated on

Want to print the executed sql right after its execution in WordPress? Use $wpdb object has some properties getting set for that:

Note: First of all you have to set define( 'SAVEQUERIES', true ); in your wp-config.php file at root folder of WordPress.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers