Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
453 views
in Q2A Core by
How can I list database queries while loading a page?

(For wordpress : http://stackoverflow.com/questions/2473079/how-to-display-all-database-queries-made-by-wordpress)

I want this for  q2a script.

2 Answers

0 votes
by

The closest thing is in qa-config.php. Look for the line:

define('QA_DEBUG_PERFORMANCE', false);

Change false into true. Take into account it won't work for AJAX requests, you'll have to output them on your own.

0 votes
by

When I want to see the SQL text of the query statements, I usually uncomment the php print statement at this line (it prints the SQL statement just "after" its execution) or copy it here (when I want to print the SQL statement just "before" its execution - useful in case of troubleshooting).

Not a very clean approach, but it works smiley

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

Categories

...