I'm thinking through a library search interface that would allow multiple 'rounds' of searching where people could narrow their results by adding more criteria. There are a bunch of possible search parameters that can each have 0 or more selectors. (authors, publishers, keywords, publication dates, etc.) What I'm looking for is an efficient approach for creating persistence for either the parameters of the search or the result set. Here are some of the techniques I've cosidered: [1] Store previous SQL query as text and concatenate the new and/or logic. [2] Store the unique IDs of the existing result set in an array and filter results of next search for presence in the array. [3] Massive generic zSQL method with handling for all parameters ...using a bunch of <dtml-if parameter> and <dtml-if "_.hasattr(parameter, 'sort')"> to switch on and off the different arms of this query. Persistence of search parameters through sessions or <input type="hidden"... (this seems like it has way to much overhead, are there any benefits to this approach?) Any suggestions on how to create this sort of functionality? Thanks! -- David