[wp-hackers] Seeing the Actual SQL statements WP is running when compiling the posts...

IC IC icwordpress at gmail.com
Sat Dec 3 04:02:13 UTC 2011


Is there a way to see/output the actual SQL query wp runs for
compiling the current page record(s)?

For learning purposes, I'd like to see what SQL query runs when we say

query_posts( 'cat=1&tag=apples+apples' );

or when I am serving a taxonomy page such as

mysite.com/fruits/apple

what's the SQL query WP is running? Can I hook into that section and
output the SQL statement on the screen?


More information about the wp-hackers mailing list