android - Doing math calculations in a SQLite where clause -
with android's sqlite, possible math calculations on column values in clause? example, want select rows have values in column named mcolumnname. following approach didn't work me.
query(mtable, mcolumns, mcolumnname+"%2=?", new string[]{"0"}, null, null, null, null) is there way achieve this?
android binds query arguments strings, produces bugs when using functions , operations produce numeric results. inlining 0 in selection string should fix this:
query(mtable, mcolumns, mcolumnname + " % 2 = 0", null, null, null, null, null)
Comments
Post a Comment