Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在这段代码中遇到错误。
Cursor cursor = ourDatabase.rawQuery( "SELECT * FROM " + DATABASE_TABLE + " WHERE KEY_ID BETWEEN 15 AND 20", null);
我的 LogCat 说它error near ? ****** BETWEEN ? 说你在做什么。我无法弄清楚错误。请帮忙。
error near ? ****** BETWEEN ?
我相信KEY_ID是你的变量,比如DATABASE_TABLE,而不是实际的列名。尝试:
KEY_ID
DATABASE_TABLE
Cursor cursor = ourDatabase.rawQuery( "SELECT * FROM " + DATABASE_TABLE + " WHERE " + KEY_ID + " BETWEEN 15 AND 20", null);