fixed some mysql syntax errs