fix a bug in mysql query