Whoops.  Brain fart.  I had removed the cfqueryparam from the WHERE 
clause...  Makes sense now.


----- Original Message ----- 
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 19, 2004 1:36 PM
Subject: Cached Query and CFQUERYPARAM


> If I've got a query using a CFQUERYPARAM in the WHERE clause and then
> attempt to cache that query, will the query remain in CF's cache when
> called with different values for the queryparam?
>
> For example, the table 'mytable' is a very small table with just 5 rows:
>
> <cfquery datasource="#dsn#" name="myquery">
> SELECT something, somethingsomething
> FROM mytable
> WHERE mytableid = <cfqueryparam cfsqltype="cf_sql_integer" value="#id#">
> </cfquery>
>
> And if I call that query alternately with different identifiers, 1, 2, 
> 3,
> etc., will the query remain cached?  In CF's debugging output I'm seeing
> 'Time=Cached Query', but I don't understand how CF could cache the query
> unless it caches the query results for each possible queryparam value.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=38

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181924
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to