[thelist] CFQuery sub search...

Joshua Olson joshua at alphashop.net
Thu Nov 1 19:52:10 CST 2001

----- Original Message -----
From: "rudy" <r937 at interlog.com>
Subject: Re: [thelist] CFQuery sub search...

: the only limitation i can think of is that there may be a character string
: limit on the number of values in the IN list

Rudy, you read my mind!

Limitations I've seen sometimes are not the length of the IN string, but
rather the number of elements in the IN clause.  We use Sybase ASE
extensively (which is a derivative of MS SQL) and it limits the IN Clause to
255 values.  So, I've found myself having to break the list into multiple IN
clauses in the past.  Not too rough, though a little processor intensive.

If your like me, then you may not want to pass the entire list of PK's via
the form.  So, perhaps set up a session var to hold the list.  The benefit
is that the session var could already have the PK's grouped into nice little
255 PK groups for later inclusion in the "search within results".  The
primary benefit to using a session variable is not having to pass the
numbers to and from the client, but the down side is that the number have to
be stored *somewhere*.

Hence plan B.  Create a cache file on the server that contains nothing but
the PK's of the query.  Put it in a directory and set up a task to cleanse
the directory of old files every 30 minutes.  Then pass the cache filename
with the form (so it'd work regardless of session) and tell the query to
incorporate the cached file in the query.  If you formated the cache file
correctly, you could stuff the cfinclude directory within the cfquery.

All ideas.


More information about the thelist mailing list