fixing mysql syntax