You have a point in ColdFusion, or at least some close enough. You just
don't use cfoutput to loop over your recordset you use cfloop.
You can reference your 1000 row recordset with array notation.
<cfset x=10>
<cfset y=20>
<cfoutput>
<cfloop from="x" to="y" index="i">
#query.field1[i]# #query.field2[i]# #query.field3[i]#
</cfloop>
</cfoutput>
Hope that helps.
--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA
-----Original Message-----
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2003 10:44 AM
To: CF-Talk
Subject: Pagination issues
Rodrigo,
We had this problem too. We solved it by doing 2 queries. There might be a
better way, but this is what we do.
<cfquery name="getUserTicketCount">
SELECT id
FROM Tickets
</cfquery>
<cfquery>
SELECT *
FROM Tickets
WHERE id >= #ListGetAt(ValueList(getUserTicketCount.id), MyBeginningRow)#
AND
T.ticketID <= #ListGetAt(ValueList(getUserTicketCount.id), MyEndRow)#
</cfquery>
We first get the number of rows that we have. That is the first query. Then
the second query simple checks the ID of wherever we want to be in the list.
So for example, if your first query returns
1,2,3,4,7,8,9,10
you could set MyBeginningRow to say 3, MyEndRow to say 8, and the second
query then returns the info for the id's 3,4,7,8. Again, there may be better
ways to do this, and I've trimmed down the queries to be simple, but that is
the basic idea.
If anyone else has better suggestions, go ahead.
Cedric
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
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
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4