I have tested in the notepad excise, it worked well:

public static final String KEY_TITLE = "title";
public static final String KEY_BODY = "body";
public static final String KEY_ROWID = "_id";
public static final String ID_SORT_ORDER = "_id DESC";
public Cursor fetchAllNotes() {
        return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE,
                KEY_BODY}, null, null, null, null, ID_SORT_ORDER, "5");
    }


On Thu, Jul 23, 2009 at 16:53, ms99 ster <ms99s...@gmail.com> wrote:

> public static final String SCORE_SORT_ORDER =3D "score DESC";  //orderBy
> public static final String TEN_LIMIT =3D "10"; //limit
>
> SQLiteDatabase:    query 
> (String<http://developer.android.com/reference/java/lang/String.html>table,
> String[] 
> <http://developer.android.com/reference/java/lang/String.html>columns,
> String 
> <http://developer.android.com/reference/java/lang/String.html>selection,
> String[] 
> <http://developer.android.com/reference/java/lang/String.html>selectionArgs,
> String <http://developer.android.com/reference/java/lang/String.html>groupBy,
> String <http://developer.android.com/reference/java/lang/String.html>having,
> String <http://developer.android.com/reference/java/lang/String.html>orderBy,
> String <http://developer.android.com/reference/java/lang/String.html>limit)
>
> On Thu, Jul 23, 2009 at 10:00, shoume <mr_afr...@hotmail.com> wrote:
>
>>
>> I needed to create a high score table.
>> I looked everywhere but couldn't find any tutorial on that.
>> please help me if you could,
>> I looked at SQLiteDatabase but that seemed too complicated.
>> I am seeking something simpler and easier.  I'm trying to make a
>> table.just displaying data. it asks the user to insert his name and
>> shows his name and a given score already calculated. where it only
>> shows the highest 10 scores.
>>
>> any advice how to go about that?
>>
>> thanks in advance
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to