sqlite LIKE problem in android

后端 未结 4 1791
攒了一身酷
攒了一身酷 2020-12-05 23:20

Hello i\'ve spent almost 2 hours trying to figure out why the LIKE statement doesn\'t work and i only get this error: 03-03 11:31:01.770: ERROR/AndroidRuntime(11767):

4条回答
  •  旧时难觅i
    2020-12-06 00:00

    This is how I did:

    String []columns = {"_id", "name"};
    String []selectionArgs = {name+"%"};
    db.query(true,"mydb",columns,"name LIKE ?",selectionArgs,null,null,null);
    

提交回复
热议问题