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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Best way to get a custom value table (civicrm_value_)
Pages: [1]

Author Topic: Best way to get a custom value table (civicrm_value_)  (Read 361 times)

lee.gooding

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
    • Clear River Church
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.7
  • PHP version: 5.3
Best way to get a custom value table (civicrm_value_)
March 11, 2015, 02:26:28 pm
I've been digging through the BAO/DAO and I can't quite figure out if there is a method to easily grab the name of the table for a custom value group.

For example, I know that I have created a custom group named 'my_group'. Civicrm creates a table called 'civicrm_value_my_group_X'. Is there an efficient way to get this table name from PHP?

I have seen ::getTableName();, but I'm not quite sure how to implement it in this case.

Thanks!

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Best way to get a custom value table (civicrm_value_)
March 11, 2015, 02:47:21 pm
Try doing civicrm_api3('CustomGroup', 'get') from the Api Explorer - you'll see the table names :)
Try asking your question on the new CiviCRM help site.

lee.gooding

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 1
    • Clear River Church
  • CiviCRM version: 4.5
  • CMS version: Drupal 7
  • MySQL version: 5.7
  • PHP version: 5.3
Re: Best way to get a custom value table (civicrm_value_)
March 12, 2015, 10:30:17 am
Seriously...

Coleman, it's supposed to be more complicated than that!

Thanks :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Best way to get a custom value table (civicrm_value_)

This forum was archived on 2017-11-26.