Thinkphp查询mysql数据库数据时间排序有关问题

WBOY
Release: 2016-06-13 12:36:53
Original
841 people have browsed it

Thinkphp查询mysql数据库数据时间排序问题
现在的时间有三种状态,第一种已过期时间,第二种未过期时间,第三种时间为确定时间我现在想得到的效果是未过期时间在前,为确定时间在中间,过期时间在后,排序语句应该怎么写?

$list = $activity->where('is_check=1')->order('actdate desc')->limit($Page->firstRow.','.$Page->listRows)->select();
Copy after login

现在的排序只是按照时间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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!