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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -