Here's an example:
<CFQUERY NAME="qTest" DATASOURCE="#DSN_Name#" USERNAME="#DSN_Username#" 
PASSWORD="#DSN_Password#">
         SELECT ID, Option_Desc
         FROM Forecast.dbo.Options
         ORDER BY ID
</CFQUERY>

<CFSCRIPT>
for( x = 1; x LTE qTest.RecordCount; x=x+1 ) {
         WriteOutput( qTest.ID[x] & " - " & qTest.Option_Desc[x] & "<br>" );
}
</CFSCRIPT>


At 03:54 PM 4/3/01 +0100, Jason  Lees (National Express) wrote:

>Hi all,
>
>Is it possible to loop through the results of a CFQuery structure?
>
>and Has anybody got an example of how its done
>
>TIA.
>
>
>Jason Lees
>National Express
>Email : [EMAIL PROTECTED]
>
>###################################################
>This document is intended for, and should only be read by, those persons to
>whom it is addressed. Its contents are confidential and if you have received
>this message in error, please notify us immediately by telephone on 0121 
>609 6301
>and delete all records of the message from your computer. Any form of 
>reproduction,
>dissemination, copying, disclosure, modification, distribution and / or
>publication of this message without our prior written consent is strictly
>prohibited. Neither the author of this message nor their employers accept
>legal responsibility for the contents of the message. Any views or opinions
>presented are solely those of the author.
>If you have any queries please contact [EMAIL PROTECTED]
>####################################################
>##################################################
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to