我希望能够SELECT opponents id from a db table WHERE id=$currplayer
。
我的数据库表是这样的: fk_player fk_opponent
如果我这样做:
SELECT fk_opponent
, COUNT(fk_opponent) AS oplay
FROM nf_newversus
GROUP BY fk_opponent
它做对了,但我希望能够对此进行排序,所以它只是那些 fk_player = $currplayer... 我试图插入 aWHERE fk_player = $currplayer
但这是不对的...
任何帮助表示赞赏。