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.
我必须使用 2 个值作为条件(1 个整数值和 1 个字符串)更新行值表单数据库。我该如何写这个..我写了以下代码..但是它显示错误。请纠正我。
long id=db.update(DATABASE_TABLE, initialValues, KEY_ROWID + "=" + update and category ='Income' , null);
提前致谢。
您的错误是 where 语句:
KEY_ROWID + "=" + update and category ='Income'
这将是 :
KEY_ROWID + "=" + update + "and category LIKE \"Income\""