WordPress admin side query debug

Sometime I really hat wordpress query module.
For debug ,it is too many package!!

Now I show the way to sql debug

edit /wp-includes/wp-db.php
and find…

$this->result = @mysql_query( $query, $dbh ); // line: 1111

And replace like below…

if ( is_admin() ){
			echo "\n";
		}
		$this->result = @mysql_query( $query, $dbh );

That’s all. After that you will get all query sql throw Html-Source.

Comments are closed.