I\'m trying to make an expendable list view with the header text being extratced from column \"Organ features\" and child text is extratced from the pharynx column, this is my d
I believe that you want a query based upon :-
SELECT * FROM OrganAnatomy WHERE Pharynx IS NOT NULL ORDER BY Organ_features;
This would result in :-
To convert this for use by the SQLiteDatabase
query
method, the code instead of being :-
public Cursor getDatabase() {
return mDB.query(DATABASE_TABLE, null, null, null, null, null, DATABASE_GROUP_1);
}
could be :-
public Cursor getDatabase() {
String whereclause = DATABASE_CHILD_1 + " IS NOT NULL";
return mDB.query(DATABASE_TABLE, null, whereclause, null, null, null, DATABASE_GROUP_1);
}
SELECT * FROM OrganAnatomy GROUP BY _id HAVING Pharynx IS NOT NULL ORDER BY Organ_features;
(works as _id will be unique so every row will be in it's own group).