当前位置:网站首页>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 .
边栏推荐
- Try catch finally implementation mechanism
- liver failure! My friend made a programming navigation website!
- What is the difference between a network card and a port
- Bitwise Operators
- 跟着Vam一起学习Typescript(第一期)
- Kubernetes popular series: getting started with container Foundation
- [tke] enable CPU static management strategy
- Video intelligent analysis platform easycvr derivative video management platform menu bar small screen adaptive optimization
- Embedded Software Engineer written interview guide arm system and architecture
- What is browser fingerprint recognition?
猜你喜欢
[go] concurrent programming channel
A survey of training on graphs: taxonomy, methods, and Applications
Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)
A survey on model compression for natural language processing (NLP model compression overview)
Ui- first lesson
Problems encountered in the work of product manager
[leetcode108] convert an ordered array into a binary search tree (medium order traversal)
Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)
A survey on dynamic neural networks for natural language processing, University of California
Ps\ai and other design software pondering notes
随机推荐
What is the difference between a network card and a port
Automatically refresh CDN cache in real time based on cos log
Percona Toolkit series - Pt deadlock logger
If only 2 people are recruited, can the enterprise do a good job in content risk control?
How does easydss, an online classroom / online medical live on demand platform, separate audio and video data?
TRTC web end imitation Tencent conference microphone mute detection
Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)
How to access tke cluster API interface with certificate or token
API documents are simple and beautiful. It only needs three steps to open
What is the difference between optical fiber jumper and copper wire
TVP experts talk about geese factory middleware: innovating forward and meeting the future
Private domain defense in the cotton Era
Greenplum role-based fine-grained permission control
Kubernetes popular series: getting started with container Foundation
Prometheus deployment
Data acquisition and transmission instrument reservoir dam safety monitoring
Regular expression learning artifact!
It may be a good idea to use simulation software in the cloud for simulation
How do HPE servers make RAID5 arrays? Teach you step by step today!
Tencent on the other hand, I was puzzled by the "horse race" problem