--=====================_50606103==_.ALT
Content-Type: text/plain; charset="us-ascii"

Apparently, this is not necessary. 
Queries are cached by name *and* the exact SQL. So different WHERE clauses will cache 
separately.


At 09:50 AM 8/2/00 -0700, Scott Weikert wrote:
>Well... say you've got some sort of unique identifier for that user - be it
>a GUID, or an ID that you generate, etc. that is assigned to that user in
>some fashion (client variable, cookie, etc). Grab all or part of that ID and
>use it in your query name, like "query123abc" for one guy and "query456def"
>for the next. This way the queries don't overwrite each other when two or
>more people hit the same page (though they may have different 'WHERE'
>statements based on various choices they made to get to that page). And you
>set up these queries to be cached for a short time so they don't get nailed
>each time, but don't hang around terribly long either.
>
>Here's how I do it -
>
><CFSET QueryName = "QueryName" & UserID>
>
>Say "UserID" is '123abc', you'd end up with "QueryName123abc".
>
><CFQUERY NAME="#Evaluate("QueryName")#" DATASOURCE="ds"
>CACHEDWITHIN="whatever you set">
>
>Later when you want to reference the query, use the same method. I've found,
>however, that sometimes you have to remove the quotes INSIDE the Evaluate()
>function, a la 'Evaluate(QueryName)'. I use this method in an app I'm
>working on. Depending on a particular variable setting, I grab the contents
>of one of a series of pre-generated queries (tucked into Application
>variables, as I use them all the time and they don't change). All the names
>of the queries are a string plus a number (the value of the variable in
>question). I use <CFWDDX> to packetize the query results - and in this case,
>I have to use 'Evaluate(Queryname)' as opposed to 'Evaluate("QueryName")'.
>
>Hope that helps!
>--Scott
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, August 02, 2000 4:38 AM
>> To: [EMAIL PROTECTED]
>> Subject: RE: Paging query results
>> 
>> 
>> Could someone explain this please.
>> 
>> best,  paul
>> 
>> At 03:02 PM 8/1/00 -0700, you wrote:
>> >Perhaps use a dynamically-generated
>> >query name so that two people hitting the page at the same time won't
>> >overwrite each other's query results.
>> 
>> --------------------------------------------------------------
>> ----------------
>> Archives: http://www.mail-archive.com/[email protected]/
>> To Unsubscribe visit 
>> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=list
>s/cf_talk or send a message to [EMAIL PROTECTED] with
>'unsubscribe' in the body.
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032

--=====================_50606103==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<font size=3>Apparently, this is not necessary. <br>
Queries are cached by name *and* the exact SQL. So different WHERE
clauses will cache separately.<br>
<br>
<br>
At 09:50 AM 8/2/00 -0700, Scott Weikert wrote:<br>
<blockquote type=cite cite>Well... say you've got some sort of unique
identifier for that user - be it<br>
a GUID, or an ID that you generate, etc. that is assigned to that user
in<br>
some fashion (client variable, cookie, etc). Grab all or part of that ID
and<br>
use it in your query name, like &quot;query123abc&quot; for one guy and
&quot;query456def&quot;<br>
for the next. This way the queries don't overwrite each other when two
or<br>
more people hit the same page (though they may have different
'WHERE'<br>
statements based on various choices they made to get to that page). And
you<br>
set up these queries to be cached for a short time so they don't get
nailed<br>
each time, but don't hang around terribly long either.<br>
<br>
Here's how I do it -<br>
<br>
&lt;CFSET QueryName = &quot;QueryName&quot; &amp; UserID&gt;<br>
<br>
Say &quot;UserID&quot; is '123abc', you'd end up with
&quot;QueryName123abc&quot;.<br>
<br>
&lt;CFQUERY NAME=&quot;#Evaluate(&quot;QueryName&quot;)#&quot;
DATASOURCE=&quot;ds&quot;<br>
CACHEDWITHIN=&quot;whatever you set&quot;&gt;<br>
<br>
Later when you want to reference the query, use the same method. I've
found,<br>
however, that sometimes you have to remove the quotes INSIDE the
Evaluate()<br>
function, a la 'Evaluate(QueryName)'. I use this method in an app
I'm<br>
working on. Depending on a particular variable setting, I grab the
contents<br>
of one of a series of pre-generated queries (tucked into 
Application<br>
variables, as I use them all the time and they don't change). All the
names<br>
of the queries are a string plus a number (the value of the variable
in<br>
question). I use &lt;CFWDDX&gt; to packetize the query results - and in
this case,<br>
I have to use 'Evaluate(Queryname)' as opposed to
'Evaluate(&quot;QueryName&quot;)'.<br>
<br>
Hope that helps!<br>
--Scott<br>
<br>
&gt; -----Original Message-----<br>
&gt; From: [EMAIL PROTECTED]
[<a href="mailto:[EMAIL PROTECTED]" 
eudora="autourl">mailto:[EMAIL PROTECTED]</a>]<br>
&gt; Sent: Wednesday, August 02, 2000 4:38 AM<br>
&gt; To: [EMAIL PROTECTED]<br>
&gt; Subject: RE: Paging query results<br>
&gt; <br>
&gt; <br>
&gt; Could someone explain this please.<br>
&gt; <br>
&gt; best,&nbsp; paul<br>
&gt; <br>
&gt; At 03:02 PM 8/1/00 -0700, you wrote:<br>
&gt; &gt;Perhaps use a dynamically-generated<br>
&gt; &gt;query name so that two people hitting the page at the same time
won't<br>
&gt; &gt;overwrite each other's query results.<br>
&gt; <br>
&gt; --------------------------------------------------------------<br>
&gt; ----------------<br>
&gt; Archives:
<a href="http://www.mail-archive.com/[email protected]/" 
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
&gt; To Unsubscribe visit <br>
&gt;
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=list" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=list</a><br>
s/cf_talk or send a message to [EMAIL PROTECTED]
with<br>
'unsubscribe' in the body.<br>
------------------------------------------------------------------------------<br>
Archives:
<a href="http://www.mail-archive.com/[email protected]/" 
eudora="autourl">http://www.mail-archive.com/[email protected]/</a><br>
To Unsubscribe visit
<a href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf_talk</a>
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 
</font></blockquote><br>

<font size=2><b><br>
---------------------------------------------------------------------------<br>
Peter Theobald, </b>Chief Technology Officer<br>
</font><font size=3 color="#0000FF"><b>LiquidStreaming </b></font><a 
href="http://www.liquidstreaming.com/" eudora="autourl"><font size=2 
color="#0000FF"><u>http://www.liquidstreaming.com</a><br>
</u></font><font size=2>[EMAIL PROTECTED]<br>
<b>Phone</b> 1.212.545.1232 <b>Fax</b> 1.212.679.8032<br>
</font></html>

--=====================_50606103==_.ALT--

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to