I didn't completely understand your question, but perhaps this will help.
Coldfusion keeps track of current row ID for you. Just use
query_name_here.CurrentRow
If you want to perform another query every 5 rows just use:
<cfif query_name_here.CurrentRow MOD 5 EQ 0>
Run some query
</cfif>
- Daniel Elmore
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Jake McKee
Sent: Sunday, March 06, 2005 1:34 AM
To: [email protected]
Subject: Query question
OK, I'm trying to do something funky and can't quite seem to make it click.
I run a big ass query, get some results, use CFOUTPUT to output those
results. I use a variable that I reset with each new DB row output in
order to find the last row ID of the query results.
Now, what I'd like to do find the next 5 most recent entries in the DB,
starting from that last row ID.
So database has rows 1-20. My first query looks like:
1
2
3
4
I want the results of my second query to be:
5
6
7
8
9
10
Makes sense? How would I do such a thing?
Thanks!
Jake
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm
----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
http://www.dfwcfug.org/form_MemberRegistration.cfm