modify sql command to db