利用gettotal统计查询来调用帝国CMS当前栏目缩略图方法

利用gettotal统计查询来调用帝国CMS当前栏目缩略图方法
当前栏目ID

<?=$empire->gettotal("selectclassidastotalfrom{$dbtbpre}enewsclasswhereclassid={$GLOBALS['navclassid']}limit1")?>

当前栏目的缩略图:

<?=$empire->gettotal("selectclassimgastotalfrom{$dbtbpre}enewsclasswhereclassid={$GLOBALS['navclassid']}limit1")?>

当前父栏目ID

<?=$empire->gettotal("selectclassidastotalfrom{$dbtbpre}enewsclasswhereclassid={$class_r[$navclassid][bclassid]}limit1")?>

当前父栏目的缩略图

<?=$empire->gettotal("selectclassimgastotalfrom{$dbtbpre}enewsclasswhereclassid={$class_r[$navclassid][bclassid]}limit1")?>

注释:调用什么字段就填写什么字段,如栏目ID:classid 、栏目图片:classimg
注意:gettotal用count(*)时为统计,用*时为字段;*号也可以是字段如:classid

本文收集自网络,由本站搜集发布,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。如需转载,请注明文章来源。

© 版权声明
THE END
喜欢就支持一下吧
点赞34 分享