android - SQLite delete all rows where not equal "stage!=? " -
i try delete row sqlite database on apps.
code "where field value equal"
mydatabase.delete("potentials", "stage=?", new string[]{"ready install"});
but need "where field value not equal"
mydatabase.delete("potentials", "stage!=?", new string[]{"ready install"});
and
mydatabase.delete("potentials", "stage<>?", new string[]{"ready install"});
i tried code, not work
try function:
public void deletepostbyid(int id) { sqlitedatabase db = this.getwritabledatabase(); db.execsql("delete " + table_check + " " + id + "!='" + id + "'"); db.close(); //db.delete(table_cat, cat_id + "= ?", new string[]{string.valueof(catid)}); }
Comments
Post a Comment