Home > Backend Development > PHP Tutorial > mysql - How does thinkphp retrieve data from the database in reverse order, and then output it to the template in forward order?

mysql - How does thinkphp retrieve data from the database in reverse order, and then output it to the template in forward order?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-26 10:28:26
Original
2698 people have browsed it

I’m a little confused, please ask an expert to explain.

Reply content:

I’m a little confused, please ask an expert to explain.

Write $result = array_reverse($result);
in the php code and then pass $result to the template

By controlling the sql statement, you can fetch data in reverse order order by field desc,

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Why thinkphp has better performance than laravel?
From 1970-01-01 08:00:00
0
0
0
ThinkPHP Why use composer?
From 1970-01-01 08:00:00
0
0
0
thinkphp versions supported by php6
From 1970-01-01 08:00:00
0
0
0
thinkphp upload files
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template