Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Cfquery - Use cfqueryparam and cachewithin on same query

Engaged ,
Sep 09, 2007 Sep 09, 2007
Question:
How can we use cachedwithin and cfqueryparam together in the same query? When I run the following code, It states that the two cannot be used together:

<cfquery name="get_something" datasource="#application.datasource#" cachedwithin="#CreateTimeSpan(1,0,0,0)#">
SELECT * from tablename
WHERE id = (<cfqueryparam value=#someid# cfsqltype="cf_sql_bigint">)
</cfquery>

I would like to be able to cache the query and also validate the value being passed to it.


Any ideas on how to pull it off?
423
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 09, 2007 Sep 09, 2007
upgrade to cf8. prior to cf8 it was not possible.

--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 09, 2007 Sep 09, 2007
LATEST
If you are not using cf8, validate the variable before the cfquery tag. In fact, if you are using cf8, validate the variable before the cfquery tag.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources