How to run a function each time the db is modified.

How to run a function each time the db is modified.

Hello,

I created a Comment System in php, but i have a question!

I want that every time that have a new comment it appear in the page with a fadeIn effect, without refresh.

Note: Sorry if my english is not legible.