GROUP BY
Androidで使用する場合、このコードの問題は何 ですか。このコードを sqlite でテストしてください:
public void getPlayerName_OrderBy(int First_TeamID)
{
int Match_ID = get_MatchID();
int matchId;
int teamID;
int PlayerID;
String Name;
if(Player_SD != null)
Player_SD.clear();
String selectQuery = "SELECT "+ STStrikerPlayerName+", count +"("+STStrikerPlayerName+")" +" FROM " +TABLE_SCORE+" where "+ STMatchID +" = '"+ Match_ID +"'"+" AND " +STFristTeamID + "= '"+First_TeamID+"'"+" GROUP BY "+STStrikerPlayerName;
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(selectQuery, null);
if (cursor.moveToFirst()) {
do {
Player_score_details psd = new Player_score_details();
matchId = Integer.parseInt(cursor.getString(0));
teamID = Integer.parseInt(cursor.getString(1));
PlayerID = Integer.parseInt(cursor.getString(3));
Name = cursor.getString(20);
} while (cursor.moveToNext());
}
db.close();
}