在我的DBHelper的getEvents方法中有这行代码.
int year, month, day;
String[] columns = new String[] { KEY_EVENTNAME, KEY_DESCRIPTION,
KEY_HOUR, KEY_MINUTE, KEY_DAY, KEY_MONTH, KEY_YEAR,
KEY_REMINDER };
Cursor c = database.query(DATABASE_TABLE, columns,
KEY_YEAR + "=?"+ " AND " + KEY_MONTH + "=?" + " AND "+ KEY_DAY + "=?",
new String[] {String.valueOf(year), String.valueOf(month), String.valueOf(day)},
null, null, KEY_MONTH + " AND "
+ KEY_DAY);
Run Code Online (Sandbox Code Playgroud)
它总是什么都不返回.当我删除以下内容时
int year, month, day;
String[] columns = new String[] { KEY_EVENTNAME, KEY_DESCRIPTION,
KEY_HOUR, KEY_MINUTE, KEY_DAY, KEY_MONTH, KEY_YEAR,
KEY_REMINDER };
Cursor c = database.query(DATABASE_TABLE, …Run Code Online (Sandbox Code Playgroud)