以下是我的查询,以正确的降序排列百分比。SELECTconcat(round(100 * ( count(t5.answ IN (t1.answ, t2.answ, t3.answ)) ) / case when t6.name< 4 then 100 when t6.name = 4 then 200 when t6.name > 4 then 300 end,0)) as score,fromt1score输出为
91%, 96%
我试图根据我的计算值对mysql数据进行排序。但是,我知道rsort()、sort(),但是我不能在foreach之外对它们进行单独排序,因为这将是不一致的。当我只想按百分比排序时,我有三个数组需要保持一致。我怎么能这么做?很感谢你。 //certain mysql connection code hide because it's not relative to this question.]=bp_core_ge