英语翻译action=trim(request.querystring("action"))if action="zhao" thentiaoxingma=request.form("tiaoxingma")Set rs=conn.execute("select * from booklog where tiaoxingma='"&tiaoxingma&"'")elseset rs=conn.execute("select * from booklog ")end if

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 13:37:24
英语翻译action=trim(request.querystring(

英语翻译action=trim(request.querystring("action"))if action="zhao" thentiaoxingma=request.form("tiaoxingma")Set rs=conn.execute("select * from booklog where tiaoxingma='"&tiaoxingma&"'")elseset rs=conn.execute("select * from booklog ")end if
英语翻译
action=trim(request.querystring("action"))
if action="zhao" then
tiaoxingma=request.form("tiaoxingma")
Set rs=conn.execute("select * from booklog where tiaoxingma='"&tiaoxingma&"'")
else
set rs=conn.execute("select * from booklog ")
end if

英语翻译action=trim(request.querystring("action"))if action="zhao" thentiaoxingma=request.form("tiaoxingma")Set rs=conn.execute("select * from booklog where tiaoxingma='"&tiaoxingma&"'")elseset rs=conn.execute("select * from booklog ")end if
action=trim(request.querystring("action"))'获取url get提交的数据给变量action,trim是过滤前后空格字符
if action="zhao" then '判断action等于"zhao" 时 执行以下操作
tiaoxingma=request.form("tiaoxingma")
获取表单文本框名为tiaoxingma的值给变量tiaoxingma
Set rs=conn.execute("select * from booklog where tiaoxingma='"&tiaoxingma&"'")
执行数据库查询,把查询到的数据集赋给rs conn是连接打开数据库的字符串函数,Execute是执行查询命令()里面的是查询语句,查询数据库表 booklog 字段tiaoxingma数据等于'"&tiaoxingma&"'的数据
else'判断action不等于"zhao"时执行以下操作
'执行数据库查询 查询booklog所有数据
set rs=conn.execute("select * from booklog ")
end if'if判断语句结束