I had the same problem. I usually solve it with aliases
<cfquery name="qq" dbtype="query">
SELECT     getdir.name as name, getdir.size as size, 
           getdir.datelastmodified as datelastmodified , q1.UserName as
UserName
FROM       getdir, q1
WHERE      getdir.name = q1.fileName
</cfquery>
<cfoutput query="qq">
   #qq.DATELASTMODIFIED#,#qq.NAME#,#qq.SIZE#,#qq.USERNAME#<br>
</cfoutput>

Pascal

-----Original Message-----
From: Cary Gordon [mailto:[EMAIL PROTECTED]] 
Sent: dinsdag 16 juli 2002 20:47
To: CF-Talk
Subject: Query of queries oddness


I am having what I see as an anomalous issue with a query of queries.
The 
code and the results are below.

One of the queries is a cfdirectory listing.

cfdump'ing the query of queries ("qq") returns the correct data, but 
outputting it does not.

Somehow, the cfoutput of the query of queries is returning the info from

the first row of the cfdirectory listing, rather than the row that
matches 
the test.

<cfdirectory action="LIST" directory="D:\NISO-AZ\files\" name="getdir">
<cfquery name="q1" datasource="#DSN#">
         SELECT    files.fileName, users.UserName
         FROM      files, users
         WHERE   files.fileOwner = users.UserID
</cfquery>
<cfquery name="qq" dbtype="query">
         SELECT     getdir.name, getdir.size, getdir.datelastmodified, 
q1.UserName
         FROM       getdir, q1
         WHERE    getdir.name = q1.fileName
</cfquery>

<cfdump var="#qq#">

<cfoutput query="qq">
 
#GETDIR.DATELASTMODIFIED#,#GETDIR.NAME#,#GETDIR.SIZE#,#Q1.USERNAME#<br>
</cfoutput>

<cfdump var="#getdir#">

<cfdump var="#q1#">

Results...

TDIR.DATELASTMODIFIEDGETDIR.NAMEGETDIR.SIZEQ1.USERNAME
07/11/2002 11:53:30 AM testfile.txt 9 Cary Gordon

07/11/2002 04:50:31 PM,.,0,Cary Gordon

ATTRIBUTESDATELASTMODIFIEDMODENAMESIZETYPE
07/11/2002 04:50:31 PM . 0 Dir
07/11/2002 04:50:31 PM .. 0 Dir
A 07/11/2002 11:53:30 AM testfile.txt 9 File


FILENAMEUSERNAME
testfile.txt Cary Gordon





______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to