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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -