4399小游戏单人游戏:这段SQL语句错在那里。

来源:百度文库 编辑:高校问答 时间:2024/05/10 08:03:26
sql1="select beizhu02 from baojia where hetongid='"&hetongid&"'and name_zhong='"&name_zhong&"'and beizhu02='"&beizhu02&"'"

系统提示:
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft VBScript 编译器错误 错误 '800a0401'

语句未结束

/baojia/edit_gyfukuan_post.asp,行31

sql1="select beizhu02 from baojia where hetongid='"&hetongid&"'and name_zhong='"&name_zhong&"'and beizhu02='"&beizhu02&"'"
---------------------------------------------------^

应该这样
select beizhu02 from baojia where hetongid='"&hetongid&"' and name_zhong='"&name_zhong&"' and beizhu02='"&beizhu02&"'"
and 前面要加一个空格,因为&只是简单的把两个字符串连接起来,这样and就和前面的连在一起了

"select beizhu02 from baojia where hetongid='" & hetongid & "'and _
name_zhong='" & name_zhong & "' and beizhu02='"& beizhu02 & "'"
中间有个连接上句与下句的 _