public LeaderboardEntry getEntry(int id)
{
SQLiteDatabase db = getReadableDatabase();
Cursor cursor = null;
cursor = db.query(SCORES_TABLE_NAME, new String[] { KEY_ID, KEY_NAME, KEY_SCORE}, KEY_ID + "=?", new String[] { Integer.toString(id) }, null, null, null);
LeaderboardEntry entry = new LeaderboardEntry();
if(cursor != null)
{
if(cursor.moveToFirst())
{
entry.setID(cursor.getInt(0));
entry.setName(cursor.getString(1));
entry.setScore(cursor.getInt(2));
}
}
cursor.close();
db.close();
return entry;
}