UCH数据调用加强包(整理中)

程序名称:UCH数据调用加强包 (只有一个文件)

版本号: v1.0

简要概述:以最快速,最实用,最有效的理念出发,本文件中包含了目前UCH最常用的数据调用SQL语句,我们将它集成到UCH数据调用加强包,方便您随时调取需要获取的数据。

使用说明:我们按调用方式将它分为:单一变量和数组变量。

变量命名:我们使用语义化的变量名称,为了避免与官方定义变量名称重复,我们在变量名中加入了cd_字母开头。

片段演示:

//日志总数
$cd_blogcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT COUNT(*) FROM '.tname('blog')), 0);

//日志总查看数
$cd_blogviewcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT sum(viewnum) FROM '.tname('blog')),0); 

//贴子总数
$cd_threadcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT COUNT(*) FROM '.tname('thread')), 0);

//贴子总查看数
$cd_threadviewcount = $_SGLOBAL['db']->result($_SGLOBAL['db']->query('SELECT sum(viewnum) FROM '.tname('thread')),0);

相关文章:

1、UCH远程图片本地化添加水印
https://www.onexin.net/discuz/ucenter_home/localization-of-uch-remote-image-watermark/

2、UCH日志增加系统分类技巧
https://www.onexin.net/discuz/ucenter_home/increase-in-uch-log-taxonomy-coup/

3、日志推送到群组方法For UCH2.0
https://www.onexin.net/discuz/ucenter_home/log-pushed-to-group-method-for-uch2/

4、给你的UCH插件文章加上TAG(通用方法)
https://www.onexin.net/discuz/ucenter_home/uch-plug-ins-to-your-article-with-tag-general-method/

5、UCH会员动态Google Maps API幻灯切换效果
https://www.onexin.net/latest/uch-member-dynamic-google-maps-api-slide-transition-effects/

转载请注明出处:https://www.onexin.net/discuz/ucenter_home/uch-data-called-enhancement-packages-not-public/

Leave a Reply

Your email address will not be published. Required fields are marked *