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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Querying related recurring contributions
Pages: [1]

Author Topic: Querying related recurring contributions  (Read 547 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Querying related recurring contributions
October 05, 2011, 08:32:08 am
I am in the process of writing a query against the "civicrm_contribution_recur" and "civicrm_contribution" tables.  My goal is to get the original amount and schedule selected ( such as $100 per month for 12 installments)  plus any completed installments. ( ie if we are 6 months in, I expect to find 6 completed contribution records.)

I am planning to do an SQL JOIN on civicrm_contribution.contribution_recur_id  = civicrm_contribution_recur.id

Will this get the records I intend on?  Is there a better way?

Thanks,
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Querying related recurring contributions

This forum was archived on 2017-11-26.