我想去android中的sqllite數據庫的一些信息,但我不知道什麼。 我的代碼是:在Android中使用多個查詢在遊標中
public Cursor getData() {
String myPath = DB_PATH + DB_NAME;
db = SQLiteDatabase.openDatabase(myPath, null,
SQLiteDatabase.OPEN_READONLY);
Cursor c = db.rawQuery("SELECT text,_id from tbl_laws where parent_id = 0",null);
// Note: Master is the one table in External db. Here we trying to access the records of table from external db.
Cursor c1 = db.rawQuery("SELECT text,_id from tbl_nokte where parent_id = 0",null);
// Note: Master is the one table in External db. Here we trying to access the records of table from external db.
return c;
return c1;
}
誰能幫助我?
請提供一些樣本數據和您想要的輸出。 –