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

Popular posts from this blog

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -