How to implement descending order of phpcms: first find and open the "formguide_fields.class.php" file; then find the "listview" method part in the file; then add the statement "order by dataid desc" in the corresponding position of the code ;Save at last.
phpcms form information is arranged in reverse order (arranged in descending order by ID) code modification!
I was really drunk and searched for a long time, but I still found the list function from paging. The phpcms form information is arranged in reverse order (in descending order by ID) and the code is modified.
In formguide\admin\include \formguide_fields.class.php, find:
function listview($page = 1, $pagesize = 30) { $page = max(intval($page), 1); $offset = $pagesize*($page-1); $limit = " LIMIT $offset, $pagesize"; //phpfensi.com $result = $this->db->query("SELECT * FROM $this->tablename $limit");
Add "order by dataid desc" (note the space) desc before "$limit" in "SELECT * FROM $this->tablename $limit" Descend means descending order asc means ascend ascending order.
Recommended: "phpcms tutorial"
The above is the detailed content of How to sort in descending order in phpcms. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
