Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Android Data Persistence CRUD Operations with SQLite Deleting Data

Zubeyr Aciksari
Zubeyr Aciksari
21,074 Points

HOORAY! Rover has been found! We can now delete this entry from our database. As usual, assume you already have a variab

Please little help here, i am confused! Thanks!

CodeChallenge.java
String clause = String.format("%s=%s", "name", "Rover");
database.delete(MemeSQLiteHelper.PETS_TABLE);


/* Add your code here! 
 * Assume you already have a variable named 'database'.
 */

3 Answers

George Pirchalaishvili
George Pirchalaishvili
3,747 Points

Try this code

database.delete ("PETS_TABLE", clause, null);
Zubeyr Aciksari
Zubeyr Aciksari
21,074 Points

Thanks a lot Gearge, it worked!

Zubeyr Aciksari
Zubeyr Aciksari
21,074 Points

i am sorry for the misspelling, didn't mean it George.. Thanks anyways!