If you were not using MySQL, using database triggers would be a possible approach. I think that MySQL has triggers, starting with 5.0, but I've never used them.
For SQLite (and SQL triggers, in general), there is this post for example.
Updated in response to tinitas comment.
In reply to Re: Log changes in a database (DBI)
by Corion
in thread Log changes in a database (DBI)
by citromatik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |