わかりましたので、次のデータベースがあります。
CREATE TABLE IF NOT EXISTS `highscores` (
`lid` int(11) NOT NULL,
`username` varchar(15) NOT NULL,
`score` int(16) NOT NULL,
PRIMARY KEY (`lid`,`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
ふたはレベルIDです。
テーブルに次の値があるとしましょう。
lid, username,score
1,sam,15
1,joe,12
1,sue,6
1,josh,9
2,sam,8
2,joe,16
2,sue,4
3,sam,65
4,josh,87
4,sue,43
5,sam,12
5,sue,28
5,joe,29
and so on.
次のものを取得するためにクエリを作成する方法(または必要に応じて一連のクエリ)を作成するにはどうすればよいですか
sam has 3 high scores
joe has 2 high scores
josh has 1 high score
前もって感謝します。