使用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

声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!

原文地址:利用gettotal统计查询来调用帝国CMS当前栏目缩略图方法发布于2022-07-07 07:44:29

相关推荐