当前位置:网站首页>Zblog system realizes the tutorial of the number of articles published on the same day when the foreground calls
Zblog system realizes the tutorial of the number of articles published on the same day when the foreground calls
2022-06-24 16:48:00 【Shell house railing - Wenxi】
I'm making a Zblog You need to call the number of articles published today when using the template , After a search , The Internet is basically for 24 Number of articles published within hours , After that, the problem was solved through query verification , Record the method to avoid forgetting .
call ZBlog Website The total number of articles published today needs to write a function to query the database , The method is as follows : In the theme of ”include.php“ Copy and paste the following functions in the file :
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;}Add the following calling code where you want to display the statistics
{get_todayArticleNum()}After the above steps are completed , Go to the background homepage and click 【 Empty cache And recompile the template 】 that will do .
边栏推荐
- Kubernetes 1.20.5 setting up Sentinel
- Tencent releases the full platform version of reasoning framework TNN, and supports mobile terminal, desktop terminal and server terminal at the same time
- Page scrolling effect library, a little skinny
- AI video structured intelligent security platform easycvr intelligent security monitoring scheme for protecting community residents
- Tencent on the other hand, I was puzzled by the "horse race" problem
- Tencent released "warehouse express" and issued "ID card" for each commodity!
- Finite element simulation in design
- The mystery of redis data migration capacity
- liver failure! My friend made a programming navigation website!
- Cloud + community [play with Tencent cloud] video solicitation activity winners announced
猜你喜欢

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

Ui- first lesson
![[go] concurrent programming channel](/img/6a/d62678467bbc6dfb6a50ae42bacc96.jpg)
[go] concurrent programming channel
![[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)

Applet - use of template

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

Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)

A survey on dynamic neural networks for natural language processing, University of California

Problems encountered in the work of product manager

Applet wxss
随机推荐
网站SEO排名越做越差是什么原因造成的?
06. Tencent cloud IOT device side learning - Introduction to basic functions
Nonholonomic constrained robot
What is the difference between optical fiber jumper and copper wire
Customized Tile Map cut - based on Tencent map
Finite element simulation in design
Sigai intelligent container damage identification products are deployed in Rizhao Port and Yingkou Port
@There is a free copyright protection service for enterprises in Dawan District
Greenplum role-based fine-grained permission control
It may be a good idea to use simulation software in the cloud for simulation
## Kubernetes集群中流量暴露的几种方案 Kubernetes集群中流量暴露的几种方案
Video structured intelligent analysis platform easycvr video recording plan function optimization / regularly delete expired videos
Talk about some good ways to participate in the project
Page scrolling effect library, a little skinny
[tke] analysis of CLB loopback in Intranet under IPVS forwarding mode
Join in ABAP CDs
If only 2 people are recruited, can the enterprise do a good job in content risk control?
Robot toolbox matlab robotics toolbox
Tencent on the other hand, I was puzzled by the "horse race" problem
About with admin option and with grant option