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?

WBOY
Release: 2016-08-26 10:28:26
Original
2666 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:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template