Trigger Problem with Master and Detail table relation

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
world_php_mysql
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat May 23, 2015 10:38 am

Trigger Problem with Master and Detail table relation

Post by world_php_mysql » Sat May 23, 2015 10:42 am

I have a customer master table and customer detail table. The master details relation is purely at the front end level i.e. in the forms of Joomla / PHP where as at the backend level the Foreign key constraints are not defined. I cannot change this pattern due to an existing framework that I am using.

I have written a trigger on the customer detail table as to when a row is inserted in the customer detail table one of the column values in the customer master table needs to be updated. When I am entering data into the detail table the master table value does not get updated but a row is inserted in the detail table which seems to me that the trigger is not fired. But if I do the same thing at the back end i.e. I insert a row in the detail table using PhpMyAdmin the master table values get updated suggesting the trigger is fired.

So is there anything in Joomla that is preventing this to happen?
Please advice.

world_php_mysql
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat May 23, 2015 10:38 am

Re: Trigger Problem with Master and Detail table relation

Post by world_php_mysql » Mon May 25, 2015 7:58 am

Hello All ....

Any solution on this ?
Please suggest


Locked

Return to “General Questions/New to Joomla! 3.x”