- {php $where = "typeid=$t"}
- {pc:content action="lists" catid="$catid" where="$where" order="id DESC" num="30"}
- ...
- {/pc}
使用phpcms制作筛选页面时用的了where子句,但发现使用where子句之后$catid失效,网上搜索找到问题原因,看以下代码
用的是content->classes->content_tag.class.php->lists()方法
当where属性定义了,catid的作用在于确定数据模型,而在SQL语句中,catid并不起作用。