0

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 1

1

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();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.