String[] columns = { "a_id", "day", "time", "sum(count)" };
Cursor c = db.query("DicTable", columns, " day like '" + key1+ "%' and time like '" + key2 + "%'", null, "a_id", null,
"sum(count) desc");
int theTotal = c.getCount();
int a_idCol = c.getColumnIndex("a_id");
int dayCol = c.getColumnIndex("day");
int timeCol = c.getColumnIndex("time");
int countCol = c.getColumnIndex("sum(count)");
columns[0] = c.getString(a_idCol);
columns[1] = c.getString(dayCol);
columns[2] = c.getString(timeCol);
columns[3] = c.getString(countCol);
String[] columns1 = { "app_id", "pack", "act" };
Cursor s = db.query("AppTable", columns1, "app_id like '" + columns[0]+ "%'" , null, null , null, "desc" );
int appCol = s.getColumnIndex("app_id");
int paCol = s.getColumnIndex("pack");
int acCol = s.getColumnIndex("act");
columns1[0] = s.getString(appCol);
columns1[1] = s.getString(paCol);
columns1[2] = s.getString(acCol);
CursorJoiner joiner = new CursorJoiner(Cursor c, columns[0], Cursor s, columns1[0]);
for (CursorJoiner.Result joinerResult : joiner) {
.............. .....................
제가 만든 소스의 일부입니다.
간단히 말하면.
두개의 테이블을 만든후, 쿼리를 이용해서 데이터를 뽑아오려고 하는데요.
두 테이블에 있는 a_id 와 app_id 가 같은것을 체크해서
AppTable 내의 pack 과 act 필드의 값을 뽑아오고 싶습니다.
그러던중 CursorJoiner를 찾았는데, 혹시 이것을 이용해서 가능한가요???
어떻게 조인을 해서 값을 가져와야할지 도저히 안되네요.....ㅠㅠㅠ



