android - SQLite Database Problem while delete -
hi new android. using sqlite database in application meanwhile written queries using + delete tablename value = + value;
this query
string delete_query = "delete " + tablename + " title = '" + title + "'"; database.execsql(delete_query);
i want write query using placeholder ?. tried
database.delete(tablename, title + "?" , new string[] {title});
instead "?" tried (?)/('?')/'?' giving me error....
can 1 tell me how write appropriate query using ?.....
thanks in advance. mahaveer
make sure have put equal sign:-
database.delete(tablename, title + "=?" , new string[] {title});
Comments
Post a Comment