MySQL triggers. Is it a good idea to use them?

F.schettino

Italian
I have a lot of forms that modify, for example, the J! Groups of users, so I have to write a lot of PHP to align information on users in the various lists/forms (Juser plugin acts only on savings data; it doesn't acts on loading lists/forms).

Does anyone have experience in the use of triggers?
Are there drawbacks in using them with Fabrik?
 
Triggers are safe to use with Fabrik.

The main precaution you should take is to turn off caching for lists built on tables which you modify with triggers, as Fabrik has no way of knowing that the data in them may have changed independently. That setting is in the Advanced tab in the List settings.

Also be mindful of any 'calc' elements which may use data that you change via triggers, if the calcs are set to "calc on save only" (so they don't re-calc when displaying the data).

-- hugh
 
Thank you, hugh.
Your reassurances make me quiet.
I will try.

I had doubts, since I found nothing in wiki and threads.

I saw a massive use of triggers in an ERP system.

Are not used in Fabrik?
 
We don't use them, no. But nothing to stop you using them, to achieve any custom solutions you need.

-- hugh
 
If they are using triggers they also may be using foreign key contraints.

This can create issues e.g. if deleting records via Fabrik.
But usually you can work around (e.g. adding a "update column" trash or delete via list php...)
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top