ah yes - I'll try this and see how performance is effected. Currently we
are using this:
<cfloop query="application.queryname">
<cfif fieldvaue = client.variable>
<cfset whereami = currentrow>
<cfset start = whereami>
<cfbreak>
</cfif>
</cfloop>
<cfoutput query="APPLICATION.gettable" startrow="#start#".....
.
.
.
.
which can get pretty inefficient as the size of the rec set builds
-----Original Message-----
From: Chris Lofback [mailto:[EMAIL PROTECTED]]
Sent: 22 July 2002 17:29
To: CF-Talk
Subject: RE: Looping thru recordset
Here's a possible CF solution:
<CFSET TargetValue = "value you are looking for here">
<CFSET StartRow = ListFind(ArrayToList(MyQuery["MyField"]),TargetValue)>
<CFOUTPUT QUERY="MyQuery" STARTROW="#StartRow#">
<BR>#MyField#
</CFOUTPUT>
Chris Lofback
Sr. Web Developer
TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL 33761
www.trxi.com
-----Original Message-----
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 12:18 PM
To: CF-Talk
Subject: Looping thru recordset
I think I already know the answer to this but is there a way of determining
the position in a recordset of a particular value without having to loop
thru it.? I have a recordset stored in an application variable which I want
to query (CF 5) to find the pos of this record. I then want to get
everything else after it in the recordset. I think the answer to this is I
can't without looping thru all recs but I appear to have left my SQL hat at
home today so I'm hoping one of you may prove me wrong :)
------------------------------------------------------------------
Andy Ewings
Director
Thoughtbubble Ltd
http://www.thoughtbubble.net
------------------------------------------------------------------
United Kingdom
http://www.thoughtbubble.net
Tel: +44 (0) 20 7387 8890
------------------------------------------------------------------
New Zealand
http://www.thoughtbubble.co.nz/
Tel: +64 (0) 9 419 4235
------------------------------------------------------------------
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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