fixing order for mysql