0
public ArrayList <PatientInfo> getAllPatients(String username) {
ArrayList <PatientInfo> patients = new ArrayList <PatientInfo>();
open();
Cursor cursor = db.query(UserTable, null, null, null, null, null, AccessedDate);
while (cursor != null && cursor.moveToNext()) {
try {
} catch (Exception ex) {
//Log.e("XXX", ex.getMessage());
}
}
if (cursor != null)
cursor.close();
close();
Collections.reverse(patients);
return patients;
}
我在我的方法中獲取用戶名作爲參數,我如何根據用戶名查詢我的表並獲得user specific result
。Android:基於用戶名的sqlite查詢