0

我有一个用户数据库,每个用户都有名字、姓氏和年龄

我需要在这一行添加什么?

Cursor cursor = mDatabase.query(DATABASE_ATTENDEES_TABLE, null, Attendee.DATABASE_KEY_USER_ID + " = ?", new String[] { Long.toString(user_id) }, null, null, Attendee.DATABASE_KEY_LASTNAME);
4

1 回答 1

2

谢谢我明白了:

Cursor cursor = mDatabase.query(
    DATABASE_ATTENDEES_TABLE, 
    null, 
    Attendee.DATABASE_KEY_USER_ID + " = ?", 
    new String[] { Long.toString(userId) }, 
    null, 
    null, 
    Attendee.DATABASE_KEY_LASTNAME+ " ASC," + 
        Attendee.DATABASE_KEY_FIRSTNAME  + " ASC," +
        Attendee.DATABASE_KEY_AGE
);
于 2012-11-09T16:59:30.547 回答