how to add WHERE clause to Query on android

后端 未结 3 1059
清酒与你
清酒与你 2021-02-19 19:13

I would like to limit the results to those whose KEY_HOMEID is equal to journalId. I\'ve been on this for a couple days any help would be appreciated.

public Curso

3条回答
  •  长情又很酷
    2021-02-19 19:50

    I was looking for an answer to my problem here as well.

    It turned out that I tried to have a String instead of an Integer. My solution was to do it like that: 'String' instead of Integer.

    Here is the code that worked for me in the end:

    return db.query(TABLE_NAME_REMINDER, PROJECTION, REMINDER_REMINDER_TYPE+" = '"+rem_type+"'", null, null, null, null);
    

提交回复
热议问题