快帮帮我

booro 2003-03-31 10:36:58
高手啊,zhuid是一级栏目的分栏,如何把zhuid设为一啊,就是一进到xxx.asp时。。他显示的zhuid是1,。快帮帮我
<%@ LANGUAGE = VBScript.Encode %>
<!--#include file="articleconn.asp"-->
<!--#include file="home1.asp"-->
<%
dim zhuid,typeid,zhu,types
dim sql


typeid=Request.QueryString("typeid")
zhuid=Request.QueryString("zhuid")

if not IsNumeric(zhuid) or zhuid="0" then
Response.Write("错误参数")
Response.End
end if

if typeid<>"" then
if not IsNumeric(typeid) then
Response.Write("错误参数")
Response.End
end if
else
end if

Set rs= Server.CreateObject("ADODB.Recordset")

if typeid<>"" then
sql = " select type.type,zhu.zhu,zhu.zhuid from type,zhu where type.zhuid=zhu.zhuid and type.typeid="&typeid
rs.open sql,conn,1,1
if not rs.eof then
types=rs("type")
zhu=rs("zhu")
else
Response.Write("错误参数")
Response.End
end if

else

sql="select zhu from zhu where zhuid="&zhuid
rs.open sql,conn,1,1
if not rs.eof then
zhu=rs("zhu")
else
Response.Write("错误参数")
Response.End
end if

end if

rs.close
%>

...全文
45 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
tonnycncn 2003-03-31
  • 打赏
  • 举报
回复
初始化不就可以了,
zhuid=1

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧