If you search my name and SQL or WAMP or PHP.. you'll see many posts where I have provided sketches, php code and table set-up on how to start to logging data to a MySQL database.
What server side scripting language are you using to talk to the database? PHP? Other?
Are you familiar/fluent with PHP?