<%dim rs,sql,typeid,number,theday,curpage,i,borderid
typeid=trim(request("typeid"))
borderid=trim(request("borderid"))
if typeid="" then
response.write "错误!版面编号不能为空!<a href=# onclick='javascript:window.history.go(-1)'>返回</a>"
response.end
end if
set rs=server.createobject("adodb.recordset") '每页显示的文章数
rs.open "select morenumber from news_parameter where parameterid=1",conn,1,1
if not rs.bof and not rs.eof then
number=rs("morenumber")
else
number=50
end if
rs.close
rs.open "select typename from type where typeid=" & cstr(typeid) & " and borderid=" & cstr(borderid) & " ,conn,1,1
显示上面的错误,不知道错在哪里
rs.open "select typename from type where typeid=" & cstr(typeid) & " and borderid=" & cstr(borderid) & " ,conn,1,1
------------------------------------------------------------------------------------------------------------------^
dim typeid,borderid
typeid=Request.QueryString("typeid")
borderid=Request.QueryString("borderid")
if typid<>"" and borderid<>"" then
type=0 '字符串类型 ,1为数字,0为字符串类型
if type=1
sql="select typename from type where typeid="&typeid& "and borderid="&borderid""
else
typid=cstr("typid")
borderid=cstr("borderid")
sql="select typename from type where typeid='"&typeid&"'and borderid='"&borderid"'"
end if
response.write(sql)
rs.open "sql",conn,1,1
end if
注意细节
rs.open "select typename from [type] where typeid="&cstr(typeid)&" and borderid="&cstr(borderid)&"",conn,1,1
或者
rs.open "select typename from [type] where typeid="&cstr(typeid)&" and borderid="&cstr(borderid),conn,1,1