我有以下声明:
SELECT title, price FROM table WHERE id=?我应该使用绑定ID:
sqlite3_bind_int(myStmt, 0, current_id);或者我必须使用:
sqlite3_bind_int(myStmt, 1, current_id);我的问题是-第一个绑定参数应该是0还是1?
使用sqlite3_column_xxxx获取数据时也有同样的问题。
发布于 2009-04-11 17:42:37
根据the documentation的说法,“最左边的SQL参数的索引为1。”
但是,对于sqlite3_column_xxxx,“结果集最左边的列的索引为0”。
https://stackoverflow.com/questions/740502
复制相似问题