None of your examples used the syntax: <cfoutput query="getEmloyee"> #currentrow# </cfoutput>
That one does work, which is I believe what Sean and Watts were saying. CFLOOP is a completely different animal. ----- Original Message ----- From: "Dan G. Switzer, II" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, August 22, 2002 12:15 PM Subject: RE: CFMX & CurrentRow? > Sean, > > My reply was orientated more at the original post. The reason I post the > question is I was wondering if maybe an unscoped "currentRow" variable > was available to pre-CFMX versions that contained the last value of > currentRow in a loop. > > However, I just tested this in CF4.51, CF5 and CFMX and an unscoped > "currentRow" variable does not exist. For that matter, the all the > different behaviors I tested acted the same: > > <!-- example 1 --> > <cfquery name="getEmployee" datasource="cfsnippets"> > SELECT * > FROM Employees > </cfquery> > > <cfloop query="getEmployee"> > <cfset currentRow = getEmployee.currentRow> > </cfloop> > > <cfoutput>#currentRow# :: #getEmployee.currentRow#</cfoutput> > > > <!-- example 2 --> > <cfquery name="getEmployee" datasource="cfsnippets"> > SELECT * > FROM Employees > </cfquery> > > <cfloop query="getEmployee"> > <cfset iTmp = currentRow> > </cfloop> > > <cfoutput>#iTmp# :: #getEmployee.currentRow#</cfoutput> > > > <!-- example 3 (causes an error) --> > <cfquery name="getEmployee" datasource="cfsnippets"> > SELECT * > FROM Employees > </cfquery> > > <cfloop query="getEmployee"> > <cfset iTmp = currentRow> > </cfloop> > > <cfoutput>#iTmp# :: #currentRow#</cfoutput> > > In all cases the first variable contained the total number of records > and the second value either was undefined or "1". > > -Dan > > > -----Original Message----- > > From: Sean A Corfield [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, August 22, 2002 10:53 AM > > To: CF-Talk > > Subject: Re: CFMX & CurrentRow? > > > > On Thursday, August 22, 2002, at 07:27 , Dan G. Switzer, II wrote: > > > Out of curiosity, which syntax are you using: > > > > > > #currentRow# > > > > > > or > > > > > > #queryName.currentRow# > > > > > > I know that "#queryName.currentRow#" works. > > > > The latter. I wouldn't have expected the former to work - does it work > in > > pre-MX releases? The reason I think like that is that, to me, > currentRow > > is a pseudo-column so you shouldn't expect it to be available > 'unadorned', > > only as part of a query-qualified reference. > > > > "If you're not annoying somebody, you're not really alive." > > -- Margaret Atwood > > > > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists