DBManager dbManager = new DBManager(context);
SQLiteDatabase sdb = dbManager.getReadableDatabase();
String sql = "select pname,sname,sclass,phone from stu where sclass='"la"';";
cursor = sdb.rawQuery(sql, null);
while(cursor.moveToNext()){
String pname = cursor.getString(cursor.getColumnIndex("pname"));
String sname = cursor.getString(cursor.getColumnIndex("sname"));
String sclass = cursor.getString(cursor.getColumnIndex("sclass"));
int phone = cursor.getInt(cursor.getColumnIndex("phone"));
G.dbData.add(new DBData(pname,sname,sclass,phone));
}
dbAdapter=new DBAdapter(context, G.dbData);
checklist.setAdapter(dbAdapter);
이 코드로 sql 문을 사용에 DB값을 가져와 어댑터에 넣어서
리스트뷰 (checklist) 로 보여주는 건데
리스트뷰에서 세가지가 선택되었을때 그 세가지 DB의 phone값을 가져와
문자 보내는걸 하고싶은데
여기서 phone값을 가져오는걸 어떻게 해야될지 모르겠습니다ㅠㅠ
제가 너무 횡설수설해서 설명이 이상할수도있지만 ㅠㅠ 잘부탁드리겠습니다. ㅠㅠ