database update quesry fix