有没有办法用下面的东西对数字进行排序
GameID Turn
3 2
6 1
7 2
5 2
8 0
9 1
return should be { for example GameID 6 is TURN for the Game or Left in the Game }
GameID Turn
6 1
9 1
8 0
3 2
5 2
7 2
another example { for example GameID 7 is TURN for the Game or Left in the Game }
GameID Turn
7 2
3 2
5 2
8 0
9 1
6 1
那只是我需要弄清楚的一个样本。是否可以对转弯进行排序?
我不能使用 ORDER BY turn DESC/ASC 因为做的顺序就是这样2 1 0
,而 ASC 0 1 2
bu 我需要弄清楚的是,如果我们2
从那时开始,现在以这种方式排序 { 我们有 0 1 2 }排序应该是这样的,2 0 1
或者如果我们从第 1 回合开始,排序应该是这样的1 2 0
我希望有什么能明白我的意思...
请我已经用过 asort 但它不适合。还有其他用于排序的php函数吗?
谢谢...