可能重複:
update sql database with ContentValues and the update-method如何使用where子句在SQLite中進行更新查詢?
我使用此代碼,但我想更新它根據我的ID。
public void updateforgotpassword(String data) {
// TODO Auto-generated method stub
ContentValues forgotpass = new ContentValues();
forgotpass.put("password", data);
try {
db.update(TABLE_NAME, forgotpass, null, null);
}
catch (Exception e)
{
String error = e.getMessage().toString();
}
}
我該怎麼做?
你甚至嘗試尋找它呢? – JoxTraex
參考這篇文章[http://stackoverflow.com/a/3874985/966550](http://stackoverflow.com/a/3874985/966550) – waqaslam