Please consider MySql compability in any mod espescially mod that included rs.absolutepage. Example:
set rs = Server.CreateObject("ADODB.Recordset")
'## Forum_SQL
strSql ="SELECT " & strTablePrefix & "ONLINE.UserID, " & strTablePrefix & "ONLINE.UserIP, " & strTablePrefix & "ONLINE.M_BROWSE, " & strTablePrefix & "ONLINE.DateCreated, " & strTablePrefix & "ONLINE.LastChecked, " & strTablePrefix & "ONLINE.CheckedIn, " & strTablePrefix & "ONLINE.SystemOS, " & strTablePrefix & "ONLINE.BrowserTYPE "
strSql = strSql & " FROM " & strMemberTablePrefix & "ONLINE "
strSql = strSql & " ORDER BY " & strTablePrefix & "ONLINE.DateCreated, " & strTablePrefix & "ONLINE.CheckedIn DESC"
rs.cachesize = 20
rs.open strSql, my_Conn, 3
i = 0
If rs.EOF or rs.BOF then '## No categories found in DB
Response.Write ""
Else
rs.movefirst
num = 0
rs.pagesize = mypagesize
maxpages = cint(rs.pagecount)
maxrecs = cint(rs.pagesize)
rs.absolutepage = mypage ------------>Error on MySql
howmanyrecs = 0
rec = 1
do until rs.EOF or (rec = mypagesize+1)
if strI = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
--snip--
This code always cause error on MySql.
Snitz Forum 2000 version 3.3.03 already change that code to something like this:
strSql ="SELECT " & strTablePrefix & "ONLINE.UserID, " & strTablePrefix & "ONLINE.UserIP, " & strTablePrefix & "ONLINE.M_BROWSE, " & strTablePrefix & "ONLINE.DateCreated, " & strTablePrefix & "ONLINE.LastChecked, " & strTablePrefix & "ONLINE.CheckedIn, " & strTablePrefix & "ONLINE.SystemOS, " & strTablePrefix & "ONLINE.BrowserTYPE "
strSql = strSql & " FROM " & strMemberTablePrefix & "ONLINE "
strSql = strSql & " ORDER BY " & strTablePrefix & "ONLINE.DateCreated, " & strTablePrefix & "ONLINE.CheckedIn DESC"
set rs = Server.CreateObject("ADODB.Recordset")
if strDBType = "mysql" then 'MySql specific code
if mypage > 1 then
intOffset = CInt((mypage-1) * strPageSize)
strSql = strSql & " LIMIT " & intOffset & ", " & strPageSize & " "
end if
'## Forum_SQL - Get the total pagecount
strSql2 ="SELECT COUNT(" & strTablePrefix & "ONLINE.UserID) AS ACTIVECOUNT"
strSql2 = strSql2 & " FROM " & strMemberTablePrefix & "ONLINE "
set rsCount = my_Conn.Execute(strSql2)
if not rsCount.eof then
maxpages = (rsCount("ACTIVECOUNT") \ strPageSize )
if rsCount("ACTIVECOUNT") mod strPageSize <> 0 then
maxpages = maxpages + 1
end if
else
maxpages = 1
end if
rsCount.close
set rsCount = nothing
rs.open strSql, my_Conn, 3
if not(rs.EOF) then
rs.movefirst
end if
else
rs.cachesize = 20
rs.open strSql, my_Conn, 3
If rs.EOF or rs.BOF then '## No categories found in DB
Response.Write ""
Else
rs.movefirst
rs.pagesize = mypagesize
maxpages = cint(rs.pagecount)
maxrecs = cint(rs.pagesize)
rs.absolutepage = mypage
end if
end if
i = 0
num = 0
howmanyrecs = 0
rec = 1
'start the loop
It will save MySql-based users time trying to fix it.