php做一个排行,根据时间排名

WBOY
Release: 2016-06-13 11:52:34
Original
1905 people have browsed it

php做一个排名,根据时间排名
php做一个排名,根据时间排名,图中是按时间倒序排的,排队字段需要按时间正序排。

正确的排队顺序与序号反过来了5.4.3.2.1
------解决方案--------------------
不是order by time就行了么
------解决方案--------------------
如果按id 逆序排可以这样写

<br />select * from table order by id desc;<br />
Copy after login

------解决方案--------------------
你的 排队 列并没有数据
------解决方案--------------------
order by 字段
desc or asc

升序 desc
降序 asc
------解决方案--------------------
你的序号是输出时 php 代码产生的
那么你的排名就是 总数-序号
序号 排名<br />1     5<br />2     4<br />3     3<br />4     2 <br />5     1
Copy after login

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!