Microsoft JET Database Engine (0x80040E14)
语法错误 (操作符丢失) 在查询表达式 'dongtai<6 and id=' 中
原文件语句:
dongtai<6 and id="&session("id")&"
谢谢。。
[此贴子已经被作者于2006-4-12 13:42:14编辑过]
<%dim dongtai,namekey
namekey=trim(request("namekey"))
dongtai=trim(request("dongtai"))
if dongtai="" then dongtai=request.QueryString("dongtai")
if namekey="" then namekey=request.querystring("namekey")
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td valign="top">
<%'开始分页
Const MaxPerPage=12
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
if namekey="" then
'//按状态查询
if dongtai=0 or dongtai="" then
select case dongtai
case "0"
rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,dongtai from shop_action where dongtai<6 and id="&session("id")&" order by actiondate desc",conn,1,1
case ""
rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,dongtai from shop_action where dongtai<6 and id="&session("id")&" order by actiondate desc",conn,1,1
end select
else
rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,dongtai from shop_action where dongtai="&dongtai&" and id="&session("id")&" order by actiondate",conn,1,1
end if
else
'//按用户查询
if dongtai=0 or dongtai="" then
rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,dongtai from shop_action where dongtai<6 and username='"&namekey&"' and id="&session("id")&" order by actiondate desc",conn,1,1
else
rs.open "select distinct(dingdan),userid,userzhenshiname,actiondate,songhuofangshi,zhifufangshi,dongtai from shop_action where dongtai="&dongtai&" and username='"&namekey&"' and id="&session("id")&" order by actiondate",conn,1,1
end if
end if
if err.number<>0 then
response.write "数据库中无数据"
end if
if rs.eof And rs.bof then
Response.Write "<p align='center' class='contents'> 对不起,您选择的状态目前还没有订单!</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"shjia.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"shjia.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"shjia.asp"
end if
end if
end if
sub showContent
dim i
i=0
%>
[此贴子已经被作者于2006-4-12 13:58:59编辑过]