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 »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • how does first subscription appearing before date_added
Pages: [1]

Author Topic: how does first subscription appearing before date_added  (Read 524 times)

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
how does first subscription appearing before date_added
May 11, 2011, 06:58:55 am
In several databases of about 10K contacts each, I'm seeing zero - 150 contacts that have group subscription dates that pre-date the date_added date (sql example below).  Some affected contacts were from imports, others manually entered.  I have not been able to determine a common thread for them, but my basic question is: how could this happen?
Code: [Select]
mysql> SELECT MIN(date) as earliest_subscription_date
    ->   FROM civicrm_contact contact_a
    ->   LEFT JOIN civicrm_group_contact ON contact_a.id     = civicrm_group_contact.contact_id
    ->   LEFT JOIN civicrm_group         ON civicrm_group.id = civicrm_group_contact.group_id
    ->   LEFT JOIN civicrm_subscription_history
    ->              ON civicrm_group_contact.contact_id = civicrm_subscription_history.contact_id
    ->             AND civicrm_group_contact.group_id   = civicrm_subscription_history.group_id
    ->  WHERE contact_a.id = 10730
    ->    AND civicrm_group.is_active = 1
    ->    AND civicrm_group_contact.status = 'Added'\G
*************************** 1. row ***************************
earliest_subscription_date: 2011-02-16 12:47:28
1 row in set (0.00 sec)

mysql> SELECT MIN(modified_date) AS date_added FROM civicrm_log
    ->  WHERE entity_id = 10730
    ->    AND entity_table = 'civicrm_contact'\G
*************************** 1. row ***************************
date_added: 2011-03-15 07:55:59
1 row in set (0.00 sec)

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: how does first subscription appearing before date_added
June 18, 2011, 12:30:03 pm
Still looking for ideas as to how this could happen - or suggestions on how to debug this.

Thanks,
=Fen

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • how does first subscription appearing before date_added

This forum was archived on 2017-11-26.