cant use like clause in android app

后端 未结 7 776
萌比男神i
萌比男神i 2020-12-07 01:23

I am working on a database with sqllite in an android app I want to retrieve sm data using a like clause ex:

Cursor c = myDB.query(MY_DATABASE_TABLE, null,          


        
相关标签:
7条回答
  • 2020-12-07 02:01

    No need for the equal sign and you should be able to include the ? right in the string without the need for the + operator. The where clause should just be:

    "SongName LIKE '%?%'"
    

    and if mu is too short is correct and you only want starting with...

    "SongName LIKE '?%'"
    
    0 讨论(0)
提交回复
热议问题