ASP我怎么提取不出来单独会员的上传的信息

来源:百度知道 编辑:UC知道 时间:2024/07/04 06:15:51
我做了一个会员系统,会员用自己的帐号登陆进去可以查看自己上传的信息。但是我提取出来的是全部的信息,怎么提取不出来单独的信息呢。求大峡帮忙啊。具体代码如下。

<!--#include file="asp/sqlstr.asp"-->

<!--#include file="asp/opendb.asp"-->
<!--#include file="asp/checked.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if

'打开数据库,读出编辑通讯录权限
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")<

数据库字段如果是数字型数据不用加单引号,字符型(文本)必须加单引号

sql="select * from userinf where username=" & sqlstr(oabusyusername)
这句有问题啊, username肯定是文本型数据吧,加上单引号

sql="select * from userinf where username='" & sqlstr(oabusyusername) &"'"

sql="select * from userinf, clientinf where userinf.username='" & sqlstr(oabusyusername) &"'"