卓越飞翔博客卓越飞翔博客

卓越飞翔 - 您值得收藏的技术分享站
技术文章1829本站已运行4109

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

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

<?=$empire->gettotal("select classid as total from {$dbtbpre}enewsclass where classid={$GLOBALS['navclassid']} limit 1")?>

当前栏目的缩略图:

<?=$empire->gettotal("select classimg as total from {$dbtbpre}enewsclass where classid={$GLOBALS['navclassid']}  limit 1")?>

当前父栏目ID  

<?=$empire->gettotal("select classid as total from {$dbtbpre}enewsclass where classid={$class_r[$navclassid][bclassid]} limit 1")?>

当前父栏目的缩略图

<?=$empire->gettotal("select classimg as total from {$dbtbpre}enewsclass where classid={$class_r[$navclassid][bclassid]} limit 1")?>

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

卓越飞翔博客
上一篇: 帝国CMS获取当前无限极栏目信息
下一篇: 帝国CMS调用栏目自定义字段方法

相关推荐

留言与评论(共有 0 条评论)
   
验证码:
隐藏边栏