updating sql query results