lundi 13 novembre 2017

CiviCRM CRM_Core_DAO::VALUE_SEPARATOR how to use it in pure SQL

I am having to populate custom fields through phpMyAdmin (when using CiviCRM), I have created the SQL statements required ... e.g.

UPDATE 'table' SET 'field1'='11213'

... but, one of the fields is used to store multiple checkbox selections (so for the example stated previously: if field1 was being used to store checkbox selections it could be that 1, 12, 13 are the checkboxes selections).

... Now my initial investigation highlights that CiviCRM uses Ctrl+A character to separate checkbox selections, and if I was coding an update I could just use CRM_Core_DAO::VALUE_SEPARATOR to insert the separator character into the query.

But, how do I add the separator character if I'm updating values through phpMyAdmin (e.g. SQL statements) and not through php code?




Aucun commentaire:

Enregistrer un commentaire