当前位置:网站首页>zblog系统实现前台调用当天发布文章数量的教程
zblog系统实现前台调用当天发布文章数量的教程
2022-06-24 16:46:00 【壳屋栏-文曦】
今天在做一个Zblog模板的时候需要调用今日发布的文章数量,经过一番查询,网上基本上都是给的24小时内发布的文章数量,后又通过查询验证解决了问题,记录下方法以免忘记。
调用ZBlog网站今日发布文章总数需要自行写一个函数查询数据库实现,方法如下: 在主题的”include.php“文件里面复制粘贴如下函数:
function get_todayArticleNum(){
global $zbp;
$db = $zbp->db->sql->get();
$sql = $db->select('zbp_post')->count('log_id', 'num')->where(array(array('=','log_Status','0'),array('CUSTOM','log_PostTime>UNIX_TIMESTAMP(CAST(SYSDATE()AS DATE))')))->sql;
$result = GetValueInArrayByCurrent($zbp->db->Query($sql), 'num');
return $result;}在要显示统计数量的地方添加下面的调用代码
{get_todayArticleNum()}上面步骤操作完成后,进入后台首页点击【清空缓存并重新编译模板】即可。
边栏推荐
- TRTC web end imitation Tencent conference microphone mute detection
- Customized Tile Map cut - based on Tencent map
- Don't let [mana] destroy your code!
- Interpretation of swin transformer source code
- What can Lu yuanjiu Jiao buy?
- A survey on dynamic neural networks for natural language processing, University of California
- 【prometheus】1. Monitoring overview
- [tke] analysis of CLB loopback in Intranet under IPVS forwarding mode
- What is the difference between get and post? After reading it, you won't be confused and forced, and you won't have to fight with your friends anymore
- How to perform concurrent stress testing on RTSP video streams distributed by audio and video streaming servers?
猜你喜欢

Applet - use of template

A survey of training on graphs: taxonomy, methods, and Applications

Some adventurer hybrid versions with potential safety hazards will be recalled

Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)

There are potential safety hazards Land Rover recalls some hybrid vehicles

Ps\ai and other design software pondering notes
![[leetcode108] convert an ordered array into a binary search tree (medium order traversal)](/img/e1/0fac59a531040d74fd7531e2840eb5.jpg)
[leetcode108] convert an ordered array into a binary search tree (medium order traversal)

A survey on model compression for natural language processing (NLP model compression overview)

Problems encountered in the work of product manager
![[go] concurrent programming channel](/img/6a/d62678467bbc6dfb6a50ae42bacc96.jpg)
[go] concurrent programming channel
随机推荐
AI structured intelligent security video monitoring technology, supporting the protective umbrella of the reserve / wild animals
[go] runtime package for concurrent programming and its common methods
Activeindex selection and redirection in the menu bar on the right of easycvs
CDs view permission check
How important is it to document the project? I was chosen by the top 100 up leaders and stood up again
Page scrolling effect library, a little skinny
AI video structured intelligent security platform easycvr realizes intelligent security monitoring scheme for procuratorate building
Handling of communication failure between kuberbetes pod
Popular explanation [redirection] and its practice
Is CICC securities reliable? Is it legal? Is it safe to open a stock account?
Script design for automatic login and command return
Private domain defense in the cotton Era
Embedded Software Engineer written interview guide arm system and architecture
FPGA project development: experience sharing of lmk04821 chip project development based on jesd204b (I)
In those years, I insisted on learning the motivation of programming
[tke] troubleshooting tips for container problems
A solution for building live video based on open source real-time audio and video webrtc architecture
How Tencent cloud es achieves cross cluster data copy & lt through reindex; Lower & gt;
Coding's first closed door meeting on financial technology exchange was successfully held
Snowflake algorithm implemented in go language