I have created a listview from an sqlite db and when i click it, it opens up the corresponding text, I want to add it to a favourites folder by clicking a button which updates a column in the row to "y". Any help would be appreciated
1 Answer
You can use the update query
pssQliteHelper = PSSQliteHelper.getInstance(context);
SQLiteDatabase db = pssQliteHelper.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("y", true);
db.update(TABLE_NAME, contentValues, " id = '" + dbInsertionId + "'",null);
db.close();