Jeg skal have oversat dette access script til mysql
<%
intPage = Request("page")
If isNumeric(intPage) = False Or intPage < 1 Then
intPage = 1
End If
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM scripts"
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("../../db/database.mdb")
rs.Open strSQL, strDSN, 1
If Not (rs.BOF Or rs.EOF) Then
rs.PageSize = 10
rs.AbsolutePage = intPage
intRecCount = rs.PageSize
intPageCount = rs.PageCount
Response.Write "<p>Side " & intPage & " af " & intPageCount & "</p>"
Do While Not rs.EOF And intRecCount > 0
%>
'Det som kommer ud af databasen
<%
intRecCount = intRecCount - 1
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
Response.Write "<p>Gå til side "
For intNum = 1 To intPageCount
Response.Write "<a href=scripts.asp?page=" & intNum & ">" & intNum & "</a> "
Next
Response.Write "<p>"
If Clng(intPage) > 1 Then
Response.Write "<a href=scripts.asp?page=" & intPage - 1 & "><<</a>"
Else
Response.Write "<<"
End If
Response.Write " "
If Clng(intPage) < Clng(intPageCount) Then
Response.Write "<a href=scripts.asp?page=" & intPage + 1 & ">>></a> "
Else
Response.Write ">>"
End If
%>
mvh.
Lasse Espeholt
webmaster for espeholt.dk
og du forventer at os PHP brugere har sat os nok ind i ASP ?
-
neuroman? det' da mig
Aloha - Er du fresh???