Recordset paging with MySQL & ASP using LIMIT

Recordset paging with MySQL & ASP using LIMIT

am 25.04.2007 10:45:06 von davidgordon

Hi,

I have an asp page which I want to display 10 records with a
'Previous' and 'Next' link underneath for navigating through the rest
of the recordset.

I have the page displaying the first 10 records and the links. The
links work, but the data does not change.
How can I adjust the SQL so that the code re-runs the SQL ? Is there a
way to override the LIMIT or change the way it is written ??

____________________________________________________________ ______________________
<%
n = request.querystring("n")
if n="" or n<0 or not IsNumeric(n) then n=0

strquery = "SELECT * FROM reports Where ReportID >" & n & " LIMIT 10;"
Set RS = adoDataConn.Execute(strquery)

If RS.EOF
Do this
Else
Display records
End if

%>

color=yellow>Previous 10
Next
10


____________________________________________________________ ______________________


Appreciate your help

Thanks in advance

David