ASP数据调用问题
来源:百度知道 编辑:UC知道 时间:2024/06/03 03:01:20
当数据库Name表里的HWName的值等于1的时候.,他就自动添加到lovelisthw.asp页面并显示该组资料.如果等于0就添加到lovelist.asp页面.这个应该怎么弄
<%
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * from Name"
rs.Open sql,conn,1,3
if rs("HWName")=1 then
response.redirect"lovelisthw.asp"
elseif rs("HWName")=0 then
response.redirect"lovelist.asp"
end if
%>
是这意思吗?加我QQ:516901000说明白点!
if hwname=1 then
添加代码
end if
if hwname=2 then
添加代码
end if
希望你能明白
在一个页面查询在跳转过去,如 index.asp里面查询的值为一就跳到lovelisthw.asp 为0 lovelist.asp
当然在跳后面页面也要查询出来
if rs("HWName")=1 then
Response.Redirect("lovelisthw.asp")
elseif rs("HWName")=0 then
Response.Redirect("lovelist.asp")
end if
不知道你的“添加到。。页面”是什么意思,小弟不才,请详细说明。