Hey guys.
Im making a paging project with ASP and MySQL. I’m using the limit and offset fuctions in MySQL to make the paging possible
Ok. hte problem
I have a function that outputs the total # of records. this is the function.
Function getCount(sql)
Set RScount = Server.CreateObject("ADODB.Recordset")
RScount.Open "SELECT Count(*) as rscount FROM " & sql & ";", Conn
Response.Write RScount("rscount")
RScount.close
set RScount = Nothing
End Function
that works perfectly
the problem is that when i want to use the total number of record to compare with the paging buttons, it prints the total records.
I hope that makes sense
heres some more code
like if i did this…
<%If pagebigcount < getCount(“news”) then%> | <a href=“options.asp?action=3&page=<%=intPage + 1%>”>Next 5</a><%end if%>
if i had 7 records, it puts out …
7 Next 5
any ideas?
this is probably really confusing, if it is, sorry. tell me and ill try harder to explain it.
thanks for any help
-Naaman