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) »
  • normalizing storage of select price fields in civicrm contribtions
Pages: [1]

Author Topic: normalizing storage of select price fields in civicrm contribtions  (Read 547 times)

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
normalizing storage of select price fields in civicrm contribtions
March 17, 2010, 09:02:05 am
The storage of selected price set field values on a civicrm_contribution record seems rather odd.

From what I see, the labels of selected fields in the price set are stored in concatenated form in civicrm_contribution.amount_level rather than in a structured way using unique ids that would facilitate joining with civicrm_price_field for reporting. It's hard to see how to easily produce reports, especially efficient ones, using a join to the civicrm_price_field table.

Is this a quick and dirty implementation that could be changed by adding an additional table in the next release?
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

JoeMurray

  • Administrator
  • Ask me questions
  • *****
  • Posts: 578
  • Karma: 24
    • JMA Consulting
  • CiviCRM version: 4.4 and 4.5 (as of Nov 2014)
  • CMS version: Drupal, WordPress, Joomla
  • MySQL version: MySQL 5.5, 5.6, MariaDB 10.0 (as of Nov 2014)
Re: normalizing storage of select price fields in civicrm contribtions
March 17, 2010, 09:35:37 am
on irc dlobo pointed me to the civicrm_line_item table which has everything in structured format.
Co-author of Using CiviCRM https://www.packtpub.com/using-civicrm/book

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • normalizing storage of select price fields in civicrm contribtions

This forum was archived on 2017-11-26.