Update database.py

Fixing table inserts fro mysql.