ColdFusion Examples
Just a bunch of ColdFusion examples
  • About Me
  • Books
ColdFusion Examples > CFQUERY

Dynamically adding columns to a database query using ColdFusion

By Peter deHaan On November 27, 2010 · Leave a Comment · In CFQUERY

The following example shows how you can dynamically add a column to a database query in ColdFusion using the queryAddColumn() function.  

Continue Reading →

Adding the values in a database query column in ColdFusion

By Peter deHaan On November 27, 2010 · Leave a Comment · In CFQUERY

The following example shows how you can get the average value and sum for a database query column in ColdFusion using the valueList(), listToArray(), arraySum(), and arrayAvg() functions.  

Continue Reading →

Displaying a grouped query using nested CFOUTPUT tags in ColdFusion

By Peter deHaan On November 1, 2010 · Leave a Comment · In CFOUTPUT, CFQUERY

The following example shows how you can display a grouped query result using nested <CFOUTPUT> tags and setting the group attribute in ColdFusion.  

Continue Reading →

Displaying a query in an HTML table using the CFTABLE tag in ColdFusion

By Peter deHaan On October 31, 2010 · Leave a Comment · In CFCOL, CFQUERY, CFTABLE

The following example shows how you can quickly display a database query in an HTML table using the <CFTABLE> tag in ColdFusion and specifying the htmlTable attribute.  

Continue Reading →

Getting a list of columns returned by a CFQUERY tag in ColdFusion

By Peter deHaan On October 31, 2010 · 2 Comments · In CFQUERY

In a previous example, “Determining the number of results from a database query in ColdFusion”, we saw how you could get the number of records returned by a database query in ColdFusion by using the recordCount property on the query object. The following example shows how you can get a list of columns in a [...]

Continue Reading →

Querying a query using the CFQUERY tag in ColdFusion

By Peter deHaan On October 30, 2010 · Leave a Comment · In CFQUERY

The following example shows how you can query an existing query object by setting the dbtype attribute to “query” on a <CFQUERY> tag in ColdFusion.  

Continue Reading →

Specifying the number of records shown in a query using the CFDUMP tag in ColdFusion

By Peter deHaan On October 30, 2010 · Leave a Comment · In CFDUMP, CFQUERY

The following example shows how you can specify the number of records shown in a database query using the top attribute in the <CFDUMP> tag in ColdFusion.  

Continue Reading →

Specifying a maximum number of results from a query using the CFQUERY tag in ColdFusion

By Peter deHaan On October 30, 2010 · Leave a Comment · In CFQUERY

In a previous example, “Querying a database in ColdFusion using the CFQUERY tag”, we saw how you could query a database in ColdFusion 9 using the <CFQUERY> tag. The following example shows how you can restrict the number of results from a database query by setting the maxRows attribute on the <CFQUERY> tag in ColdFusion. [...]

Continue Reading →

Determining the number of results from a database query in ColdFusion

By Peter deHaan On October 30, 2010 · Leave a Comment · In CFQUERY

In a previous example, “Querying a database in ColdFusion using the CFQUERY tag”, we saw how you could query a database in ColdFusion 9 using the <CFQUERY> tag. The following example shows how you can get the number of records returned by a database query in ColdFusion by using the recordCount property on the query [...]

Continue Reading →

Looping over a database query in ColdFusion using the CFLOOP tag

By Peter deHaan On October 30, 2010 · Leave a Comment · In CFLOOP, CFQUERY

In a previous example, “Querying a database in ColdFusion using the CFQUERY tag”, we saw how you could query a database in ColdFusion 9 using the <CFQUERY> tag. The following example shows how you can loop over a query object in ColdFusion using the <CFLOOP> tag.  

Continue Reading →
← Previous Entries
  • ColdFusion Language Reference
  • Recent Posts

    • Toggling the overview panel on a CFMAP tag in ColdFusion
    • Listening for map errors on the CFMAP tag in ColdFusion
    • Converting a database query to a WDDX packet using ColdFusion
    • Toggling which columns are displayed from a database query using the CFDUMP tag in ColdFusion
    • Dynamically adding columns to a database query using ColdFusion
    • Adding the values in a database query column in ColdFusion
    • Getting started with Arrays in ColdFusion
    • Converting numbers between base 10 and base 16 using ColdFusion
    • Getting started with Lists in ColdFusion
    • Displaying a database query in a grid using the CFGRID tag in ColdFusion
  • Archives

    • November 2010 (63)
    • October 2010 (13)
  • Books

  • Categories

    • Basics (4)
    • CFAJAXIMPORT (1)
    • CFAPPLICATION (1)
    • CFCOMPONENT (1)
    • CFDUMP (4)
    • CFFEED (5)
    • CFFILE (1)
    • CFFORM (2)
      • CFGRID (1)
      • CFINPUT (1)
    • CFFUNCTION (1)
      • CFARGUMENT (1)
      • CFRETURN (1)
    • CFHTTP (3)
    • CFIF (1)
      • CFELSE (1)
    • CFIMAGE (3)
    • CFINVOKE (1)
      • CFINVOKEARGUMENT (1)
    • CFLAYOUT (1)
      • CFLAYOUTAREA (1)
    • CFLOCATION (1)
    • CFLOOP (6)
    • CFMAP (10)
      • CFMAPITEM (1)
    • CFMEDIAPLAYER (11)
    • CFOBJECT (1)
    • CFOUTPUT (1)
    • CFPARAM (1)
    • CFPOD (4)
    • CFQUERY (11)
    • CFSCRIPT (2)
    • CFTABLE (1)
      • CFCOL (1)
    • CFTRY (1)
      • CFCATCH (1)
    • CFWDDX (1)
    • CFXML (1)
    • CGI (2)
    • jQuery (2)
    • Uncategorized (6)
  • Tags

    action arrayAppend() arrayAvg() arrayLen() arraySum() ceiling() centerAddress CGI ColdFusion.Map ColdFusion.Mediaplayer collapsible condition createDate() datasource dateAdd() dateFormat() delimters firstRowAsHeaders fix() format from hideBorder index jQuery listToArray() maxRows name onLoad onStart output pi() query querySetCell() recordCount round() setCenter() source step title to top type url valueList() xmlVar
  • Hosting

    Hosting provided by (mt) Media Temple

    Examples hosted by
    Dropbox.com

"No public Twitter messages." — pdehaan
ColdFusion Examples

Pages

  • About Me
  • Books

The Latest

  • Toggling the overview panel on a CFMAP tag in ColdFusion
    The following example shows how you can toggle the overview panel on […]

More

  • Flex Examples
  • ColdFusion Examples
  • ActionScript Examples
  • Adobe AIR Examples
  • DHTML Examples
This work is licensed under a Creative Commons Attribution 3.0 United States License.
PlatformPro by PageLines
Back to top