gpt4 book ai didi

android - 编译选择时在 ","附近出现语法错误

转载 作者:行者123 更新时间:2023-11-29 21:13:34 25 4
gpt4 key购买 nike

有人能找到这些查询中的错误吗?

String[] column = {"titolo","regista","cast","descrizione"};
String selection = "_id_film = ? ";
String[] selection_args = {Integer.toString(selectedfilm+1)};
Cursor cursor = db.query("T_FILM", column, selection,selection_args, null, null, null);

logcat 说:

android.database.sqlite.SQLiteException: syntax error near"," (code 1) :, while compling SELECT titolo,regista,cast,descrizione FROM T_FILM WHERE _id_film=?    

最佳答案

“Cast”是SQLite中的保留操作。所以它试图将列名“cast”解释为一个操作。最简单的答案是将列名称更改为其他名称。

关于android - 编译选择时在 ","附近出现语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22047766/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com