[Solved] retrieving one string value from cursor


Change your string query by adding the Where condition like so

String selectQuery = "SELECT some_column FROM " + AI_TABLE + " WHERE some_field = ?" ;

Then just add a selection argument when you query the DB

Cursor c = db.rawQuery (selectQuery, new String[] {"SOME_VALUE"} );

This will only return some_column to the cursor where some_field equals “SOME_VALUE”

6

solved retrieving one string value from cursor