3

When I perform an advanced search I would like to see the query that is created based on the criteria I have chosen in the Advanced Search. Is there a way to see the query that is created?

1 Answer 1

6

In civicrm.settings.php, you can enable:

define('CIVICRM_DEBUG_LOG_QUERY', 1);

Then run the "Advanced Search" and look at the output in files/civicrm/ConfigAndLog/CiviCRM*log*. This will output for several queries; to avoid accumulation of junk data, you should probably disable the CIVICRM_DEBUG_LOG_QUERY after running the query.

There's some more discussion of this and other debugging techniques at http://wiki.civicrm.org/confluence/display/CRMDOC/Debugging+for+developers

1
  • Thank you for the information. I appreciate the assistance.
    – pmatt
    Commented Jul 7, 2015 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.