Hi. Let's say I have a CFQUERY:
<CFQUERY NAME="qMyQuery">
SELECT * FROM myTable
</CFQUERY>
and the results of that query are in the thousands and I don't want to output them all at the same time for performance issues (page load, etc).
My thought was to do:
<CFQUERY NAME="qMyQuery" MAXROWS="100">
SELECT * FROM myTable
</CFQUERY>
And then at the bottom of the output, use pagination:
<a href="thispage.cfm?startAt=101">Next 100</a>
Which would load the same page, running the same query, but have the query this time query maxrows of 100 but starting at the 101st row. Problem is my unique ID column in the table is not necessarily incremental (ie I might have 1... 2...4...6...7...8) so row 100 won't be ID 100.
Does anyone know how to do this? How to make a query like this one:
<CFQUERY NAME="qMyQuery" MAXROWS="100">
SELECT * FROM myTable
</CFQUERY>
start at the 101st row of the table?
Many thanks folks!
Jeff
<CFQUERY NAME="qMyQuery">
SELECT * FROM myTable
</CFQUERY>
and the results of that query are in the thousands and I don't want to output them all at the same time for performance issues (page load, etc).
My thought was to do:
<CFQUERY NAME="qMyQuery" MAXROWS="100">
SELECT * FROM myTable
</CFQUERY>
And then at the bottom of the output, use pagination:
<a href="thispage.cfm?startAt=101">Next 100</a>
Which would load the same page, running the same query, but have the query this time query maxrows of 100 but starting at the 101st row. Problem is my unique ID column in the table is not necessarily incremental (ie I might have 1... 2...4...6...7...8) so row 100 won't be ID 100.
Does anyone know how to do this? How to make a query like this one:
<CFQUERY NAME="qMyQuery" MAXROWS="100">
SELECT * FROM myTable
</CFQUERY>
start at the 101st row of the table?
Many thanks folks!
Jeff