0

日付の昇順に問題があります...すべての日付を listDate( date format ) でグループ化したいのですが、コードに何か問題があると思います..

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)";

誰かが私の間違いを訂正してくれることを願っています...

4

1 に答える 1

0

これを試して..

return (database.rawQuery("SELECT " + SQLiteHelper.listId + " as _id, "
                + SQLiteHelper.listName + "," + SQLiteHelper.listDate + ","
                + SQLiteHelper.listDest + " FROM " + SQLiteHelper.listTable
                + " ORDER BY " + SQLiteHelper.listDate+ " ASC",null));

でスペースを与えます" ASC"

于 2012-11-30T05:40:18.763 に答える