lots of mysql command additions/edits