I'm getting stuck on the query to perform an update I have the code for performing the update done correctly I'm just not to sure what the query to do this would be if someone could help that would be great. I'm passing through 3 variables and the 3 old variables as well and also the id. I know the query I've done is wrong just an attempt.
public void updateTable(String newDate, String newMethod, String newAmount, int id, String oldDate, String oldMethod, String oldAmount){
db = this.getWritableDatabase();
String query = "UPDATE " + TABLE_INCOME + " SET " + COL2 + " " + COL3 + " " + COL4 + " = '" + newDate + newMethod + newAmount + "' WHERE " + COL1 + " = '" + id + "'" +
" AND " + COL2 + " " + COL3 + " " + COL4 + " = '" + oldDate + oldMethod + oldAmount + "'";
db.execSQL(query);
}