Logging requests with MySQL

Trying to setup a simple activity log using MySQL? Using this techniquie it's easy to get a count of actions performed on your site.

MySQL - on duplicate key update

Using "ON DUPLICATE KEY UPDATE" can be very useful when migrating data or logging to a MySQL database.