1
How to make a method that returns a string with a single result?
I’m trying something like this:
public String getString(String var) {
String selectQuery =
"SELECT * FROM "+TABLE_STATUS+" WHERE "+KEY_STATUS_KEY+"='"+var+"' LIMIT 1";
SQLiteDatabase db = this.getWritableDatabase();
Cursor cursor = db.rawQuery(selectQuery, null);
//não sei como retornar a string
}
Thank you @Jorge B worked as expected.
– Emerson Barcellos