I've spent some hours on trying to solve this but the only answer I get is that I can't select from a string? Is that so? How do I do it otherwise? Here's my code:
public String getHotness(String l) { // TODO Auto-generated method stub
String[] columns = new String []{ KEY_ROWID, KEY_NAME, KEY_HOTNESS};
Cursor c = ourDatabase.query(DATABASE_TABLE, columns, KEY_ROWID + "=" + l, null, null, null, null);
int iHotness = c.getColumnIndex(KEY_HOTNESS);
if (c != null){
c.moveToFirst();
String hotness = c.getString(iHotness);
return hotness;
}
return null;
}
Where l is a name of a person in my database. How would I select and get information from this person by his name?
Thanks! You guys are the best!