[求助]语法错误 (操作符丢失)
语法错误 (操作符丢失) 在查询表达式 'state>0 and bbsTypeTitleId=' 中。dim modelName
modelName=request("modelName")
Dim bbsTypeTitleId
bbsTypeTitleId=request("bbsTypeTitleId")
'获取问题记录
dim rsQR,sqlQR
set rsQR=server.CreateObject("adodb.recordset")
sqlQR="select * from v_otherBBS where state>0 and bbsTypeTitleId="&bbsTypeTitleId
rsQR.open sqlQR,conn,1,3
<tr><td align="center"><%=ShowPager(totalRecord,MaxPerPage,CurrentPage,"index.asp",null)%></td>
</tr>
分页函数:
Public Function ShowPager(TotalNumber,MaxPerPage,CurrentPage,Filename,Linkcount)
Dim tmpstr
Dim n '总页数
If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If
If instr(filename,"?")>0 Then
filename = filename&"&"
Else
filename = filename&"?"
End If
'=============================
'# style 1 (首 上 当 下 尾 跳)
'=============================
'转到xx页脚本
Dim strJS
strJS="<script language='javascript'>"&vbcrlf
strJS=strJS&"function gopage() {"&vbcrlf
strJS=strJS&"if(window.event.keyCode==13) {"&vbcrlf
strJS=strJS&"var pageno=document.all['pageno'].value;"&vbcrlf
strJS=strJS&"var goto='"&filename&"page='+pageno;"&vbcrlf
strJS=strJS&"document.location.href=goto;"&vbcrlf
strJS=strJS&"}}"&vbcrlf
strJS=strJS&"</"&"script>"&vbcrlf
tmpstr = tmpstr & strJS
tmpstr = tmpstr & "<table width=99% align='center'>" & vbcrlf
tmpstr = tmpstr & "<tr><td align='center' width='40%'>" & vbcrlf
tmpstr = tmpstr & " [页次 <font color=red><b>" & CurrentPage & "</b></font>/" & n & "] [总共 " & totalnumber & " 条]"
tmpstr = tmpstr & "</td><td align='center' width='60%'>" & vbcrlf
If CurrentPage<2 Then
tmpstr = tmpstr & "[<font face=Webdings color=gray>9</font>] [<font face=Webdings color=gray>7</font>] "
Else
tmpstr = tmpstr & "[<a class='news' href='"&filename&"page=1' title='首页'><font face=Webdings>9</font></a>] "
tmpstr = tmpstr & "[<a class='news' href='"&filename&"page="&CurrentPage-1&"' title='上一页'><font face=Webdings>7</font></a>] "
End If
tmpstr = tmpstr & "<input type='text' name='pageno' size=2 maxlength=10 value="¤tpage&" onKeyDown='gopage()' class='input' style='font-size:10px;font-family:arial;width:20px;'>"
If n-currentpage<1 Then
tmpstr = tmpstr & " [<font face=Webdings color=gray>8</font>] [<font face=Webdings color=gray>:</font>] "
Else
tmpstr = tmpstr & " [<a class='news' href='"&filename&"page="&(CurrentPage+1)&"' title='下一页'><font face=Webdings>8</font></a>]"
tmpstr = tmpstr & " [<a class='news' href='"&filename&"page="&n&"' title='尾页'><font face=Webdings>:</font></a>]"
End If
tmpstr = tmpstr & "</td></tr></table>"
ShowPager = tmpstr
End Function
%>
------------------------------------------------------------------------------------------------------------------------------------------------------------
别人编的程序我维护,实在是菜鸟不会改了~~~
bbsTypeTitleId="&bbsTypeTitleId改成=1的话,点击下一页显示正常,不改的话就出现上面提示的错误了
望各位大大们出手帮忙啊!谢谢了~~