Thanks, guys, for asking and answering the right question!  This is the
perfect solution to my shopping cart dilemma.  I'm not ready to tackle
structures of arrays, yet, but this works just as well if not better:

Loop through shopping cart (query) once to create a list of key fields.
Use Row = ListFind(lstKeyFields) to determine the position of the key in
question.
Retrieve data with Query.ColumnName[Row]

I don't know if this is old news to the CFPros, but I feel a song coming on!

Marianne Daye

-----Original Message-----
From: Joe Sheble aka Wizaerd [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 14, 2000 12:12 AM
To: CF-Talk
Subject: RE: queries vs arrays


Yup, you can access queries like they're arrays... here's an example:

<CFQUERY NAME="qGraph" DATASOURCE="#DSN_Name#" USERNAME="#DSN_Username#"
PASSWORD="#DSN_Password#">
        SELECT COUNT(FilePath) AS pathCount, FilePath
        FROM MasterFPPList
        GROUP BY FilePath
</CFQUERY>

<CFLOOP INDEX="x" FROM="1" TO="10">
        <CFOUTPUT>#qGraph.Filepath[x]#</CFOUTPUT><BR>
</CFLOOP>

Joseph E. Sheble
a.k.a. Wizaerd
Wizaerd's Realm
Canvas, 3D, Graphics,
ColdFusion, PHP, and mySQL
http://www.wizaerd.com
=================================

> -----Original Message-----
> From: Kevin Willyerd [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 13, 2000 3:17 PM
> To: CF-Talk
> Subject: queries vs arrays
>
>
> In Ben Fortas he says "ColdFusion queries are essentially arrays with
> named collumns. You may therefore use any of the array functions with
> queries"  Does this mean ther is a way to address queries in the form
> Query [row] [collumname]? I have tried and can not get it to work.
>
> Kevin
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to