update db queries, fix a error by insert values into db