How to separate the OBD data prior to the conclusion TextView



  • How to separate the OBD data prior to the conclusion TextView Data released by adapter

    "DESC" doesn't make any sense.

    example of code used

    Box==================================

     public long createNote(String title, String body, String date) {
    
    ContentValues initialValues = new ContentValues();
    initialValues.put(KEY_TITLE, title); 
    initialValues.put(KEY_BODY, body);
    initialValues.put(KEY_DATE, date);
    return mDb.insert(DATABASE_TABLE, null, initialValues); 
    

    }

    == sync, corrected by elderman == @elder_man

      <i>
    String orderBy = "DESC";
    return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE,
    KEY_BODY,KEY_DATE}, null, null, null, null, orderBy);
    </i>

    But DESC doesn't sort it.



  • According to the https://stackoverflow.com/a/8948476/3212712 In the request, specify which column should be added before specifying the method of sorting:

    i.e. instead

    String orderBy = DESC;

    I need you to.

    String orderBy = yourColumn + " DESC";
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2