android.database.sqlite.SQLiteException: near "s" : syntax error(代码 1): ,



android.database.sqlite.SQLiteException:接近"s":语法错误(代码1):,编译时:INSERT或REPLACE INTO电影(背景路径、id、原始语言、原始标题、概览、后发路径、标题、流行度、成人、视频、vote_avg、vote_count、release_date、收藏夹)值("/tbhdm8UJAb4ViCTsulYFL3lxMCd.jpg","76341","en","ull","一个世界末日的故事发生在我们星球最遥远的地方,在一片荒凉的沙漠中,人类被毁灭了,大多数人都疯狂地为生活必需品而战。在这个世界上有两个逃亡的反叛者,他们可能能够恢复秩序。有Max,一个行动的人,一个沉默寡言的人,他寻求和平在混乱之后,他失去了妻子和孩子。还有Furiosa,一个有行动力的女人,一个相信如果她能穿越沙漠回到童年家园,她的生存之路可能会实现的女人/kqjL17yufvn9OVLyXYpvtyrFfak.jpg','疯狂的麦克斯:狂暴之路','19.132107','false','alse','7','4359','-546474976','false');在android.database.sqlite.SQLiteConnection.naturePrepareStatement(Native Method)在android.database.sqlite.SQLiteConnection.acquisitePreparedStatement(SQLiteConnection.java:887)

您在字符串中有一个‘s,但没有对其进行转义。为了避免这种情况,请不要像这样直接插入-始终使用绑定变量。这也将避免SQL注入错误,我相信基于此,您的代码会充满这些错误。

您正试图插入There's Max,其中(')应该像There's Max 一样转义

您的错误很可能出现在以下输入中:

An apocalyptic story set in the furthest reaches of our planet, in a stark desert landscape where humanity is broken, and most everyone is crazed fighting for the necessities of life. Within this world exist two rebels on the run who just might be able to restore order. There's Max, a man of action and a man of few words, who seeks peace of mind following the loss of his wife and child in the aftermath of the chaos. And Furiosa, a woman of action and a woman who believes her path to survival may be achieved if she can make it across the desert back to her childhood homeland.

您在... There's Max 部分有一个未标注的单引号

当SQLite尝试执行此记录的插入时,它在该单引号处结束,然后,它尝试处理s Max, a man of action ....

要解决此问题,请退出"as such:\"

您必须对SQLite中的字符进行转义,以避免出现类似以下错误和SQL注入。

相关内容

最新更新