I'm making an app where I need to store data for each day and it would be helpful if i could easily filter it, so i decided to learn about SQLite databases, found tutorial (several actually), followed it and in the end always got the same result - empty cursor.
enter public Day getDay(int year, int month, int day) {
Day ret = null;
SQLiteDatabase db = this.getReadableDatabase();
Cursor c = db.rawQuery("SELECT '*' FROM '" + TABLE_DAYS + "'", null);
Log.d("DATA", "entries found: " + c.getCount());
c.close();
db.close();
return ret;
}
Method to insert new row seems to be functional as it returns expected number, but even though this is called just afterwards, it returns empty Cursor. I've read many tutorials and SO posts without finding a fix. I also tried metod .query(...) with same result.