$field ='aaa,bbb,ccc,...';
$team = $TeamActivity->alias('t')
->field($field)
->join('team_found f','t.team_id = f.team_id')
->join('goods g','g.id = t.goods_id')
->where('t.domain','=',$domain)
->where('f.found_end_time','>',$now)
->order('f.need - f.join asc')
->select();->order('f.need - f.join asc') ,我想用总人数need-加入人数join,进行升序。就是剩余人数升序。这样操作,提示 order表达式错误
最佳答案