I am trying to create a public string that will be used in other parts of my app. I have tried to review the use of cursors but I couldn't find out how it would return what I wanted. I just need this to be a public method to return the value of the column email where the rowId = 1.
How far off-base am I with this and please give me some pointers? This method is inside my DatabaseHandler
class
public String getUserName(String email) {
SQLiteDatabase db = this.getReadableDatabase();
String memail =
db.rawQuery("SELECT _email FROM login WHERE key_id = 1;", null);
return memail;
}