[求助]asp关于提取数据问题
这是login.asp<%
dim conn
set conn = Server.CreateObject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("../data/data.mdb")
%>
<%
if Request("username")<>"" then
sql="select * from userhao where username='" & trim(request("username")) & "' and userpow='" & replace(trim(request("userpow")),"'","''") & "'"
set rs = conn.Execute(sql)
if not (rs.eof or err) then
session("username")=rs("username")
session("tong")=rs("tong")
response.redirect "index.asp"
else
%>
<script language=Javascript>
alert("错误!请重新输入");
window.history.go(-1);
</script>
<%end if%>
<%end if%>
这是index.asp
<% if Sort_ID<>0 then
if session("tong") = "1" then
strsql="select * from Product where Sort_ID<>0 order by shop_name"
else
strsql="select * from Product where hueiproduct=1 order by shop_name"
end if
else
strsql="select * from Product where audit=1 order by shop_name"
end if
%>
说明:tong在库中为数字0和1,我想当该用户字段中tong=1,提取sort<>0的全部字段。
要怎么改呢?
[ 本帖最后由 虫子世界 于 2009-10-29 11:34 编辑 ]