added code to (hopefully) add data to the mysql db (untested)