这段很简单的ASP代码什么意思 听简单就是我不知道

来源:百度知道 编辑:UC知道 时间:2024/06/08 13:30:24
下面这段了 我做产品发布的时候 会用
但看不懂 承某位大侠赐教 定追分 先谢谢了
将详细些 或给我推荐一些教程
<%
strClassName=GetVariable("classname")
if strClassName="" then
strClassName="<strong><font color=#009900>■ 产品分类:</font></strong>所有产品"
else
strClassName="<strong><font color=#009900>■ 产品分类:</font></strong>" & strClassName
end if
strQuery=""
strClass=GetVariable("class")
if strClass<>"" then
SourCode=conn.execute("Select c_code From web_product_class Where mn_id=" & strCurrMenu & " and id="&strClass)(0)
strQuery=strQuery & " And c_code Like '" & SourCode &"%'"
end if

strKey=GetVariable("key")
if strKey<>"" then
strQuery=strQuery & " And (p_name Like '%" & strKey & "%' Or p_detail Like '%" & st

<%
'整个的意思就是产品多条件搜索
strClassName=GetVariable("classname")
if strClassName="" then
strClassName="<strong><font color=#009900>■ 产品分类:</font></strong>所有产品"
else
strClassName="<strong><font color=#009900>■ 产品分类:</font></strong>" & strClassName
end if
'上面这段表示首先获取classname的值,如果为空则显示“产品分类:所有产品”,并且让产品分类:这几个字绿色加粗。如果不为空则显示“产品分类:获取过来的产品名称”,同加字变绿加粗。

strQuery=""
strClass=GetVariable("class")
if strClass<>"" then
SourCode=conn.execute("Select c_code From web_product_class Where mn_id=" & strCurrMenu & " and id="&strClass)(0)
strQuery=strQuery & " And c_code Like '" & SourCode &"%'"
end if
'获取class的值,如果值不等于空则执行上面的查询语句

strKey=GetVariable("key")
if strKey<>"" then
strQuery=str