部落冲突五本防守阵型:asp 高手请进!判断两字符串相等 access

来源:百度文库 编辑:高考问答 时间:2024/04/28 01:10:21
大家帮挑错!!谢谢~~急,在线等!!

请大家挑错!~~~小妹是新手,想实现数据库中已注册用户,只能投一次票的功能!!谢谢~~
<%
set yh=server.createobject("adodb.recordset")
sql="select *from yh where yong_huming"
yh.open sql,conn,3,2
yh.movefirst
dim p1,p2
do while not yh.eof
int p1="requre("yong_huming")";
int p2="sql";
if
p1=p2
then

response.Redirect("xiaoxi.asp")
end if
loop

yh.close
set yh=nothing

%>

sql="select *from yh where yong_huming"

change it to
sql="select * from [yh] where yong_huming='name'"

yh.open sql,conn,3,2
change it to
yh.open sql,conn,1,1
查询,只需要只读集合,不需要写,所以不要浪费系统资源

查询的结果会出现 此用户名的记录集,
那也叫是在这条记录中,其中有一个字段已经存下了是否已经投票的内容.
比如
topic=1 或者topic=0
直接
if yh("topic")=1 then
response.write"已经投票过"
response.end()
else
没有投票过
增加投票

end if
yh.close
set yh=nothing

if
p1=p2
then

response.Redirect("xiaoxi.asp")
end if
改成
if p1=p2 then
response.Redirect("xiaoxi.asp")
end if

另外:loop之前应该加入yh.movenext

似乎错得很离谱```
语法上,语意上都是``