mysql 按照两个字段之和进行排序

SELECT *,zan_num+fake_zan_num show_zan FROM `tf_news` order by show_zan desc

TP实现

$news = M('news');
$result_list = $news->where($where)->limit($start . ',' . $step)->field('*,zan_num+fake_zan_num show_num')->order($order)->select();
posted @ 2019-08-01 18:24  TBHacker  阅读(4200)  评论(0编辑  收藏  举报