Hongmu Notes
Home Program Notes Empire paging query code
Program Notes Empire cms

Empire paging query code

Empire paging query code

$file_page = "juhe.txt";
$num = 50;
if(file_exists($file_page)){
    $page_num = file_get_contents($file_page);
}else{
    $page_num = 0;
}
$page_id = $page_num*$num;
$next=$page_num+1;
file_put_contents($file_page,$next);

$sql=$empire->query("SELECT * FROM `phome_ecms_news` order by `id` ASC  limit {$page_id},{$num}");
while($r=$empire->fetch($sql)){
//分页代码
}

This code can query the pagination. It is a PHP code. The effect is that it can query the data on every page in the data table.

微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

Empire CMS database statement & SQL statement format

Empire CMS database statement & SQL statement format Program Notes Empire cms

Introduction to Imperial CMS extended SQL program writing, basic examples of Imperial CMS database statements & SQL statement formats: Note: The following examples are based on placing PHP files in the system root directory. Example 1: Connect to MYSQL program. (a.php)<?php require('e/class/connect.php'); //Introduce database configuration files and public function files requ…
👁 353
Empire CMS obtains the system COOKIE variable function getcvar()

Empire CMS obtains the system COOKIE variable function getcvar() Program Notes Empire cms

Get the system COOKIE variable function syntax: getcvar($var,$ecms) Description: $var: is the variable name $ecms: 0 is to set the foreground COOKIE variable, 1 is to set the background COOKIE variable. This parameter can be omitted and defaults to 0. Usage example: getcvar('mlusername'), get the user name of the front-end login member getcvar('loginu...
👁 296
Empire CMS smart label call field collection

Empire CMS smart label call field collection Program Notes Empire cms

Collect and classify all fields that support smart tag calls into Empire CMS smart tags: [e:loop={column ID/topic ID, number of items displayed, operation type, only display pictures with titles, additional SQL conditions, display sorting}] Template code content [/e:loop] Calling time: <?=date('m-d',$bqr[newstime])?> <?=dat…
👁 3749

Recommended reading

Responsive Financial Planning Service Management Website Template 1175

Responsive Financial Planning Service Management Website Template 1175 Practical Collection Yiyou template

An EyouCMS responsive website template designed for financial wealth management service management. Its professional financial design enables effective presentation of wealth management products, investment services, wealth management solutions, and success stories. This template helps financial institutions showcase their brand online and attract investors. Template Overview | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS (E...
👁 41
(PC+WAP) Plastic Packaging Material Website Template Download – Homepage with Video – 0936

(PC+WAP) Plastic Packaging Material Website Template Download – Homepage with Video – 0936 Practical Collection pbootcms Template

A PbootCMS website template for plastic packaging materials, compatible with both PC and WAP devices, featuring a homepage with video content. The professional and practical design is ideal for showcasing plastic packaging products, manufacturing processes, and video introductions. It enables packaging material companies to conduct online multimedia marketing and promotion campaigns. Template Preview | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn (Related resources...)
👁 58
Use PHP regular expressions to replace specified content exactly once (Method 2)

Use PHP regular expressions to replace specified content exactly once (Method 2) Language Notes PHP

You can use the `preg_replace` function in PHP to perform a single regular expression replacement on specified content. This function uses a regular expression to search through a string and replaces all matching occurrences with the specified replacement string. Here is an example code snippet that replaces the first match in a string with a specified value: $string = 'This is a test string.'; $p...
👁 136
Responsive Financial Planning Service Management Website Template_20240807_101506 1176

Responsive Financial Planning Service Management Website Template_20240807_101506 1176 Practical Collection Yiyou template

An EyouCMS responsive website template designed for financial wealth management service management. Its professional financial design enables effective presentation of wealth management products, investment services, wealth management solutions, and success stories. This template helps financial institutions showcase their brand online and attract investors. Template Overview | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS (E...
👁 42
(PC + WAP) Lifestyle Encyclopedia Website Template; Article-Driven Information Website Source Code Download – 0937

(PC + WAP) Lifestyle Encyclopedia Website Template; Article-Driven Information Website Source Code Download – 0937 Practical Collection pbootcms Template

A PbootCMS website template designed for lifestyle encyclopedia and article-based information publishing, compatible with both PC and WAP devices. Its clean, information-flow design makes it ideal for sharing lifestyle guides, health tips, and practical tricks. This template helps content creators build a dedicated lifestyle information sharing platform. Template Preview | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn | Related Articles...
👁 54
Financial Investment Enterprise Holding Website Template 1177

Financial Investment Enterprise Holding Website Template 1177 Practical Collection Yiyou template

This EyouCMS template is ideal for the financial investment and corporate holding industries, featuring a premium financial design style that effectively showcases investment products, holding projects, corporate strength, and brand image. It enables financial investment groups to present their brand online and attract investors and partners. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | Eyou...
👁 60