YzmCMS当前栏目的文章总数和浏览数

分享时间:2020-02-13 502 热度℃
参考下:{php $modelinfo = get_modelinfo();$modelarr = array();foreach($modelinfo as $val) $modelarr[$val['modelid']] = $val['tablename'];if(!isset($modelarr[$modelid])) showmsg('模型不存在!', 'stop');$where='status=1';$where = strpos($arrchildid, ',') ? ' AND catid IN ('.$arrchildid.')' : ' AND catid='.$arrchildid;$total = D($modelarr[$modelid])->where($where)->total();}
本文标签:
返回顶部