android.database.sqlite.SQLiteException: near “…”: syntax error (code 1)

后端 未结 4 670
猫巷女王i
猫巷女王i 2021-01-14 15:19

When i open my RSS app, i would like to check if an article exists in my database.If it exists,i would like to delete it (or ignore it),if not to write it in the db.

4条回答
  •  深忆病人
    2021-01-14 15:54

    The answers given so far are correct, but you would be much better off using a parameterised query. There is no extra work involved - indeed it is easier that their suggestions of escaping the single quotes.

提交回复
热议问题