Home  >  Article  >  Backend Development  >  Thinkphp查询mysql数据库数据时间排序有关问题

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

WBOY
WBOYOriginal
2016-06-13 12:36:53837browse

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

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

现在的排序只是按照时间desc排序,由于涉及到分页,所以不太会写了,请各位帮帮忙。谢谢。

Statement:
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