fix sql error
display enhancement and standardize
Merge pull request #762 from grandoc/develop

fix sql error