Basic mysql class, and error logging function

gah.