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]

Reply via email to