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) »
  • MySQL trigger for updating custom fields
Pages: [1]

Author Topic: MySQL trigger for updating custom fields  (Read 816 times)

dragontree

  • Guest
MySQL trigger for updating custom fields
September 17, 2009, 07:35:03 am
I'm trying to update a custom field with a MySQL trigger. The trigger is on the civicrm_contact table. The problem is that if I update contact information the trigger wont activate.
I know that my syntax is correct because it works fine if I manually update the table with an UPDATE query.

There is a limitation in MySQL so that triggers are not activated by cascaded foreign key actions. Is that that how contact table is updated?

dragontree

  • Guest
Re: MySQL trigger for updating custom fields
September 17, 2009, 10:32:47 pm
Another thing...
As I was exploring the code I found out that the translations are done with triggers also (CRM/Core/I18n/Schema.php).
Its all still a bit confusing to me but does that mean that I can't use triggers on the civicrm_contact table? (I know that MySQL doesn't support multiple triggers with the same event(

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • MySQL trigger for updating custom fields

This forum was archived on 2017-11-26.