日期:2014-05-16 浏览次数:21099 次
<%
sql="select * from Ht_Car_Comment where 1=1"
if searchtype =1 then
sql = sql & " and Datediff(d,PostTime,'"&now&"')=0"
end if
if BrandID<>0 then
sql = sql & " and BrandID="&BrandID
end if
if SerialID <>0 then
sql = sql & " and SerialID ="& SerialID
end if
if keyword<>"" then
sql=sql & " and "&strField&" like '%" & keyword & "%' "
End if
sql=sql & " order by CommentID desc"
Set rs= Server.CreateObject("ADODB.Recordset")
Rs.open sql,conn,1,1
if Rs.eof and Rs.bof then
Response.Write "<tr class=""tdbg""><td colspan=""6"" align=""center"" style=""height:80px"">暂无数据!</td></tr>"
else
TotalPut = Rs.RecordCount
If TotalPut mod MaxPerPage > 0 Then
TotalPage = TotalPut\MaxPerPage + 1
Else
TotalPage = TotalPut\MaxPerPage
End If
if CurrentPage > TotalPage Then CurrentPage = TotalPage
if CurrentPage < 1 then CurrentPage = 1
if CurrentPage>1 then rs.move (CurrentPage-1)*MaxPerPage
Do while not rs.eof
InfoID = Rs("CommentID")
%>