Here you can find the source of getListOfDays(SQLiteDatabase db)
public static ArrayList<String> getListOfDays(SQLiteDatabase db)
//package com.java2s; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; public class Main { public final static String NESTLE_TABLE_NAME = "Nescafe"; public final static String NESTLE_COLUMN_1 = "date"; public static ArrayList<String> getListOfDays(SQLiteDatabase db) { Cursor cursor = db.query(true, NESTLE_TABLE_NAME, new String[] { NESTLE_COLUMN_1 }, null, null, null, null, null, null);//from w w w . j a v a2 s.c o m ArrayList<String> list = new ArrayList<String>(); while (cursor.moveToNext()) list.add(cursor.getString(cursor .getColumnIndex(NESTLE_COLUMN_1))); return list; } }