I've been trying to give that one a go but without much luck. My code
is:
<cfparam name="url.StartResults" default="1">
<cfparam name="URL.SortBy" default="PropertyAgentID ASC">
<CFQUERY NAME="GetAgentList" datasource="020">
SELECT TOP #URL.StartResults#
*
FROM
PropertyAgent
AND #URL.StartResults# NOT IN (
SELECT Top #URL.StartResults# FROM
PropertyAgent
ORDER BY #URL.SortBy#
)
ORDER BY #URL.SortBy#
</CFQUERY>
I'm really not sure what I'm doing, kind of very confused. Can you see
what is wrong?
Thanks,
Stuart
-----Original Message-----
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: 03 February 2004 12:37
To: CF-Talk
Subject: RE: Get Records
SELECT Top 10 id, ... FROM table
WHERE {conditions}
AND id NOT IN (
SELECT Top #x# id FROM table
WHERE {conditions}
ORDER BY {columns}
)
ORDER BY {columns}
Where x is the number of records in the previous pages (0, 10, 20, ...)
> -----Original Message-----
> From: Stuart Kidd [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 3 februari 2004 12:40
> To: CF-Talk
> Subject: RE: Get Records
>
> Thanks for that Cameron and Pascal, that works fine. But is
> there a way in the SQL query to specify start and end rows?
>
> I'm outputting the info to an html table and want to have a
> NEXT 10 records button. I know I can do this on the
> <cfoutput query="blah"
> startrow="20" endrow="30"> but that means everytime that page
> loads it's getting all the rows from the database.
>
> Cheers,
>
> Stuart
>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

