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 are multiple-choice options stored in MySQL?
Pages: [1]

Author Topic: How are multiple-choice options stored in MySQL?  (Read 806 times)

cscooper

  • Guest
How are multiple-choice options stored in MySQL?
November 26, 2011, 09:02:41 am
The default "Constituent Info - Individuals" custom data set contains a multiple-choice field for "Constituent type".  Because of the way I imported my contact information, most contacts have no constituent type specified (= no row in the civicrm_value_constituent_info table).  I was going to execute some simple SQL commands to make every contact have the "Volunteer" type if they didn't already have a constituent type, but then I noticed that the constituent_type field in the civicrm_value_constituent_info table has an interesting format - as far as I can tell, the field starts with a hex 0x01 character and ends with a hex 0x01 character, and has any number of types in-between also separated by hex 0x01 characters.  Am I reading this correctly?

Is the usage of 0x01 characters something MySQL does, or Drupal, or PHP, or is this something specific to CiviCRM?

For inserting values into this table, can I use any MySQL client (I'm using HeidiSQL on Windows to access my MySQL database remotely)?  Or is there more cleverness going on behind the scenes?

Thanks,
Chris

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: How are multiple-choice options stored in MySQL?
November 26, 2011, 11:56:30 am
This is a funny character. There are a few I think. They are specific to CiviCRM. One is defined as CRM_Core_DAO::VALUE_SEPARATOR in the code. You should be able to use Heidi, but I can't guarantee how it connects, using what collation etc. But try one and see what happens. It should work. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • How are multiple-choice options stored in MySQL?

This forum was archived on 2017-11-26.