新建的产品展示中心页面,因为里面设置了类别分类
所以每次打开的时候,只显示一个类别的产品
而不显示所有的产品列表
请问,如何做才能从菜单打开的时候默认显示所有产品
再点分类的时候,才单独显示某一类的产品
------解决方案--------------------
- VBScript code
cplb = request("cplb")
sql = "select * from table where 1 = 1"
if cplb <> "" then
sql = sql & " and cplb = '"&cplb&"'"
end if
sql = sql & " order by id desc"
------解决方案--------------------
- VBScript code
"SELECT * FROM Cp_biao WHERE cplb = ?"
这个改下,如下
Dim strSql,strWhere
strWhere = "1=1"
If cplb<>"" Then
strWhere =strWhere &"cplb="&cplb
End If
strSql = strSql&"strWhere"