CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Each contact appears 3 time in basic search
Pages: [1]

Author Topic: Each contact appears 3 time in basic search  (Read 1640 times)

michaels23

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 1
Each contact appears 3 time in basic search
September 08, 2007, 11:27:58 am
Hi all,

I could use some debugging advice with what seems to be a JOIN problem in my CiviCRM installation. When I do a basic search for all my CiviCRM contacts, they all appear 3 times in the resulting list.

The header correctly reports that 12 contacts where found, but there are 36 rows in the resulting list. The duplicates for each contact appear to be identical.

I've done some dissection of the query, which got me to the JOIN idea, but it's tedious debugging. Is there a way to determine the exact query that CiviCRM is sending to MySQL for that page?

TIA

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Each contact appears 3 time in basic search
September 08, 2007, 12:14:03 pm

The easiest way is to enable mysql query logging. Add log=/var/log/mysqld.log to my.cnf and restart your mysql server. All queries are then logged to mysqld.log

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

michaels23

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 1
Re: Each contact appears 3 time in basic search
September 08, 2007, 07:35:58 pm
That site is on a shared server that doesn't give me access to my.cnf

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Each contact appears 3 time in basic search
September 08, 2007, 10:24:32 pm

add a debug statement to echo the queries in packages/DB/Dataobject.php, function _query (line 2280 or so).


lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

michaels23

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 1
Re: Each contact appears 3 time in basic search
September 09, 2007, 07:33:32 am
... and minutes later ... problem solved!

MANY THANKS!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Each contact appears 3 time in basic search

This forum was archived on 2017-11-26.