$('#replyList_10220_359').html('

Michael07/10

在ItemDAO加一個這樣的方法:

// 讀取所有記事資料
public List getItemsByColor(Colors color) {
String where = COLOR_COLUMN + \"=\" + color.parseColor();
List result = new ArrayList<>();
Cursor cursor = db.query(
TABLE_NAME, null, where, null, null, null, null, null);

while (cursor.moveToNext()) {
result.add(getRecord(cursor));
}

cursor.close();
return result;
}

需要取得特定顏色的資料可以這樣用:

ItemDAO itemDAO = new ItemDAO(getApplicationContext());
// 取得藍色的記事
List items = itemDAO.getItemsByColor(Colors.BLUE);

GrassEatFlower07/11

我看懂了!!!
謝謝您的回覆!!獲益良多

');