Fixing MySQL syntax for consistency/PHP