Fixed typo in mysql queries.