mysql 分級構建排序語句

1.使用case when  im ORDER BY CASE WHEN end_time>NOW() AND start_time < NOW() THEN 0 WHEN start_time > NOW() THEN 1 ELSE 2 END,ABS(TIMESTAMPDIFF(second,start_time,NOW())) 2.使用 ifco ORDER BY IF(end_time>N
相關文章
相關標籤/搜索