Querying a database in ColdFusion using the CFQUERY tag

The following example shows how you can query a database in ColdFusion 9 using the <CFQUERY> tag.

<cfquery name="getArt" datasource="cfartgallery">
    SELECT *
    FROM ART
</cfquery>
 
<cfdump var="#getArt#" />

And the output of the <CFDUMP> tag is as follows:
Results of the &lt;CFQUERY&gt; call

Leave a Reply

Your email address will not be published.