Fix MySQL code