I'd like to implement users' activity logging for my web app (`php`+`js`+`mysql`).

Previously, I've used this appoach: 

* on users login create a temporary table in the database to store users id
* create triggers for all tables which insert row in `activity` table using users id from that temporary table

Now I don't really want to put so much logic in the database, so my question is: what is the best practice? Should I stay with the described method, or should I use something else?

**Edit 1**

I've seen [this](https://stackoverflow.com/questions/2488267/how-to-log-user-actions-with-php-and-mysql) question, but I'm intrested in comparing the described method with one in the answers.

**Edit 2**

Why do I need logs: I need to know which user to blame if something goes wrong =)

Logs have to contain changed data and new data to see what has actually changed.

There won't be many users cause it's a corporate app and our company is not so large.

The main question is where should I put logging logics: database or application (php backend) level?