I want to create a notification after pasting into some tables. For example, when a user inserts a comment, I create a notification for administrators that this user created a comment.
I used it manually in PHP, it was not so bad, it was something like this:
// after the comment is created
Notification::create(....);
Not bad, but sometimes I give the user the ability to add images, messages, .. etc. Therefore, I have to remember every time you insert a notification.
So, I am thinking about using mysql trigger. But I'm worried, how will this affect performance?
Last: is it possible to create a trigger after pasting into multiple tables?
Thanks,
source
share