Fixing MySQL syntax for consistency