i have problem with the ascending by date …I want to group all the date by listDate( date format ) , i think something wrong in my code ..
public Cursor getAll() {
// TODO Auto-generated method stub
return (database.rawQuery("SELECT " + SQLiteHelper.listId + " as _id, "
+ SQLiteHelper.listName + "," + SQLiteHelper.listDate + ","
+ SQLiteHelper.listDest + " FROM " + SQLiteHelper.listTable
+ " ORDER BY " + SQLiteHelper.listDate+ "ASC",null));
}
private static final String CREATE_SHOPPLINGLIST_TABLE = "CREATE TABLE IF NOT EXISTS "
+ listTable
+ " ("
+ listId
+ " INTEGER PRIMARY KEY AUTOINCREMENT, "
+ listName
+ " TEXT, "
+ listDest + " TEXT," + listDate + " INTEGER)";
hope anyone can correct me my mistake …
try this..
Give space in
" ASC".