HI Guys,

I'm working on the search component of my website.

I have a catalog created, and I can query it just fine.

I'm working on paging the results, so that users can select how many
records per page they view, and can page through them.

I pretty much have it working, but I don't think I'm handling the
search efficiently.

I have two methods for searching, a basic and an advanced. The basic
search is really the problem, as it is very broad. In terms of how
many records are shown, sort order, etc. there are defined defaults.
FOr instance, if someone performs a search, the query will run, and
only select the first 25 records. However, if there are more than 25
records, the user has the option to click "next", in which at this
point, the entire query runs again, selecting records 25-50 (or
whatever segmenting they choose).

Is there a way to cache the entire query? And just page through the
cached query? The way I have the page designed is that original search
variables are created via form variables that are passed as a form.
But when the results are displayed, the <--Previous/Next--> buttons
are simply links with all the required variables including in a url
string.

like

company.com/search.cfm?
searchstring=#string#&sort=asc&numrecords=25&page=2

So when a user clicks next, it basically uses the data in the string
to completely redo the query, search, etc. but sort it differently.

There has to be a better way. I was hoping the first search could
build a cached query, and maybe I could include that cached query ID
in the url so that the cached query is used instead of building a new
one.

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to