cgi to query_update