If I have a query object with 4 records, is there a way to set the pointer
to the third row, and use values from that record?

I've tried this:

<cfloop query="MyQuery">
        <cfif MyQuery.nRowNumber eq 3>
                <cfbreak>
        </cfif>
</cfloop>
<cfoutput>MyQuery.FieldName: #MyQuery.FieldName#</cfoutput>

however, the output is for the first row.  putting alerts in the if block,
and after the loop show that the record is being found, but then the pointer
resets to the first row.

I know I can move my output into the CFIF block, but was hoping to avoid
that (lots of code to move around in multiple places - and toooooo many uses
of the query objects to use the bracket notation i.e. MyQuery[3].FieldName.
it would take hours to change them all even with search and replace).

Can the native query variable CurrentRow be used to SET the current row?
(instead of just reporting the current row).

Thanks in advance.

Shawn Grover


______________________________________________________________________
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to