mardi 31 mars 2015

SQLite get row data using SELECT

Using SQLite Database, I have a table with 6 columns in each row as the rows are added. The first column is the name of the "person." I have it so when you click on the person in a listview, it brings up a screen with 5 edit texts. You fill them out and submit it and it adds it to another row in the database.


To retrieve that data later on, I am trying to use SELECT by the name to get it, but cannot figure out how this works.



public Cursor getChildRulesInformation(DatabaseOperations dop, String name) {
dop.getReadableDatabase().execSQL("SELECT * FROM "+CHILD_RULES_TABLE_NAME+" WHERE "+CHILD_NAME + "=\""+ name+"\"");
}


What do I do with that to retreive every column inside of that specific row. I am confused on the process to get it out.


Any lead in the write direction would be greatly appreciated. Thanks. If you need any more information please let me know.


Aucun commentaire:

Enregistrer un commentaire