请问下面这段代码sql="id is not null"和下面的sql=sql&" and……怎么理解?select case request("eeeet")case "print_c"sql="id is not null"if request("ClientCountry")"全部" then'国家/地区不为全部时sql=sql&" and ClientCountry='"&

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/19 15:46:19
请问下面这段代码sql=B\f/Qx0irK#|X!b~'g6M "ܘ_A(ޠ Gm]qk^Bz#?o 5 &9ɏ9GM/^|+cXv uW,YRuJMRk~ys/rc$UPUc:hm\M Z&^С Ћ,Ra826#&&U<]1Uy~ȽX:Ajek??$gcGށc3q$ Qljѻ9iX2U8A 7&|9Est˅hT~|JIx.70+dS6(!1~,6

请问下面这段代码sql="id is not null"和下面的sql=sql&" and……怎么理解?select case request("eeeet")case "print_c"sql="id is not null"if request("ClientCountry")"全部" then'国家/地区不为全部时sql=sql&" and ClientCountry='"&
请问下面这段代码sql="id is not null"和下面的sql=sql&" and……怎么理解?
select case request("eeeet")
case "print_c"
sql="id is not null"
if request("ClientCountry")"全部" then'国家/地区不为全部时
sql=sql&" and ClientCountry='"&request("ClientCountry")&"'"
end if
if request("ClientCity")"全部" then '城市不为全部时
sql=sql&" and ClientCity='"&request("ClientCity")&"'"
end if
这段代码中的sql是变量还是什么?菜鸟急等,期盼高手赐教

请问下面这段代码sql="id is not null"和下面的sql=sql&" and……怎么理解?select case request("eeeet")case "print_c"sql="id is not null"if request("ClientCountry")"全部" then'国家/地区不为全部时sql=sql&" and ClientCountry='"&
这段代码应该是一个拼接查询字符串的代码,sql应该是一个string类型的对象,sql="id is not null" 表示吧字符串"id is not null"赋值给sql
&符号是用来连接两个字符串的
request("ClientCountry")是一个返回类型为string的方法,我们假设他返回字符串ClientCountry
则后面的sql=sql&" and ClientCountry='"&request("ClientCountry")&"'"
转换一下其实就是
sql=“id is not null and ClientCountry=‘ClientCountry‘”
这个应该是一段asp代码,并不是直接的SQL可执行代码