I am Inserting and Updating the table By using below code
int rowsaffected = db.update(MyDatabaseHelperDon.TABLE_CURRENT, values,MyDatabaseHelperDon.VARIABLE_CURRENT + " = " + "\"" + var + "\"",null);
if(rowsaffected == 0) {
db.insert(MyDatabaseHelperDon.TABLE_CURRENT, null,values);
}
where MyDatabaseHelperDon.TABLE_CURRENT is my table name, 'values' is my Content Values, MyDatabaseHelperDon.VARIABLE_CURRENT is column name, 'var' is the Variable present in the Column.
This Code is working Fine. Now For this i need to add If Condition like 'if(value != 400)' if it satisfies then only it should update or insert.
Please Guide me How to achieve this.