Code example for SQLiteCursor

Methods: moveToFirstgetString

0
		sql += "where TEAM._ID = GAME.TEAM_A ";
	    sql += "    and GAME._ID = " + gameid + " ";
		sql += ";";
		cur = (SQLiteCursor)database.rawQuery(sql, null);
 
		cur.moveToFirst();
		return cur.getString(0);
	} 
 
	public String getRightTeamName (int gameid) {
 
		String sql;
		SQLiteCursor cur;
 
		sql = "select TEAM.NAME ";
		sql += "from TEAM, GAME ";
		sql += "where TEAM._ID = GAME.TEAM_B ";
	    sql += "    and GAME._ID = " + gameid + " ";
		sql += ";";
		cur = (SQLiteCursor)database.rawQuery(sql, null);
Stop searching for code, let great code find you!  Add Codota to your java IDE