Sqlite Android - how to get the value of a specific column / row
I have a method by which I pass an ID and then I want to find the row in this table that matches the ID and returns a row that is the colLabel of that row:
public String getIconLabel(int id){
String label;
String selectQuery = "SELECT "+colL" FROM " + allIcons + " WHERE " +colIconID + "="+id;
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.rawQuery(selectQuery, null);
label = //HELP
return label;
}
Not clear how to set the label as this column of the selected row?
please, help
+3
source to share
2 answers