语句未结束的问题

来源:百度知道 编辑:UC知道 时间:2024/05/31 07:43:57
mysql="select * from user where username='"&username&"'"
set myres=myconn.execute(mysql)

if myres.bof and myres.eof then '如果记录不为空

mysql="insert into user (username,password,email,Tel,AccountPlace,Usertype,timearea,profession,income,coffeehouse)"
mysql=mysql+"values('"&username&"','"&password&"','"&email&"','"&Tel&"','"&AccountPlace&"','"&Usertype&"','"&timearea&"','"&profession&"','"&income&"','"coffeehouse"')"

myconn.execute mysql

reponse.write"<br>注册成功"
end if
%>

上面这段代码为什么老是提示语句未结束?是哪的问题呢?
你们说的我都改了还是没用啊?

这样呢:

sql="select * from user where username='"&username&"'"
set rs=myconn.execute(sql)

if rs.eof then
mysql="insert into user (username,password,email,Tel,AccountPlace,Usertype,timearea,profession,income,coffeehouse)"
mysql=mysql&"values('"&username&"','"&password&"','"&email&"','"&Tel&"','"&AccountPlace&"','"&Usertype&"','"&timearea&"','"& profession&"','"&income&"','"&coffeehouse&"')"
set rs=myconn.execute(mysql)
reponse.write "<br>注册成功"
end if

mysql=mysql+" values('"&username&"','"&password&"','"&email&"','"&Tel&"','"&AccountPlace&"','"&Usertype&"','"&timearea