我想根据 LOCID 选择一些行。我怎么不能写 where 子句,它给出了一个编译错误,说不兼容的操作数类型说 String 和 int。
String selectQuery = "SELECT * FROM " + TABLE_LOCATIONAPPS + " WHERE "
+ KEY_LOCID == id;
这是创建查询,
String query1 = "CREATE TABLE " + TABLE_LOCATIONLABLES + "("
+ KEY_LOCID + " INTEGER PRIMARY KEY," + KEY_LOCNAME + " TEXT,"
+ ")";
LOCID 类型是 int 可能是什么原因?