Описание тега cfquery

`<cfquery>` is the primary method of executing database queries and query-of-queries (QoQ) in ColdFusion/CFML. </cfquery>

<cfquery> is the primary method of executing database queries and query-of-queries (QoQ) in ColdFusion/CFML. The <cfquery> tag's more common attributes include:

  • name - The name by which the query will be referred in code.
  • datasource - The data source against which the query is to be executed. Conflicts with dbtype.
  • dbtype - Used with a value of query for query-of-queries (QoQ) and with a value of hql for ORM. Conflicts with datasource.
  • cachedwithin - The time span for which the query results should be cached. Note: ColdFusion caches queries according to the name and text of the query; if either changes, the query will not be cached.
  • maxrows - The maximum number of rows to be returned from the query. Use -1 to return all rows. Note: This does not affect caching (see cachedwithin above); if maxrows is changed on a cached query, the query will still return the number of rows returned when it was first cached.
  • timeout - The number of seconds ColdFusion should wait before timing out the query. If <cfsetting requesttimeout="*xxx*" /> is used, will override that value if the timeout specified for the query is used.

Also see: qoq coldfusion hql

(Please see the tag's documentation for additional attributes and their explanation.)