I have a database name \"CUED\" (sqlite Android)it have a table HELLO which contain a column NAME I can get the value to String from that column. L
This is my code that returns arraylist contains afield value:
public ArrayList getAllPlayers() {
SQLiteDatabase db = this.getReadableDatabase();
Cursor cur = db.rawQuery("SELECT " + serailnumber + " as _id, " + title
+ " from " + table, new String[] {});
ArrayList array = new ArrayList();
while (cur.moveToNext()) {
String uname = cur.getString(cur.getColumnIndex(title));
array.add(uname);
}
return array;
}