This documentation refers to an older version of CiviCRM (3.4 / 4.0). The current stable version is 4.1. Please introduce all documentation changes and new material here.

Skip to end of metadata
Go to start of metadata
This page refers to CiviCRM 3.4 and 4.0, current STABLE version.

Documentation Search


CiviCRM 3.4 and 4.0 Documentation

Support and Participation

Developer Resources


CiviCRM books!

Make sure to check out the FLOSS Manual Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

Query Debugging FAQ

How can I debug search result and other query problems?

In order to debug a query problem - such as unexpected duplicate rows returned by searches - you may need to see the actual queries that CiviCRM is sending to your database.

Two different approaches to this are:

  • Enable MySQL Query Logging - Add log=/var/log/mysqld.log to my.cnf and restart your MySQL server. Check out the MySQL documentation for more information.
  • Add Debug Code to CiviCRM - Add a debug statement to echo the queries in packages/DB/DataObject.php, function _query (line 2280 or so)
Labels
  • None