Android/sqlite - Bit Operation On Where Clause
I'd like to know if it's possible to do in Android something like this: public Cursor getFlowsByCategory(int type, int categoryID, int limit) { SQLiteDatabase db = dbHelper.ge
Solution 1:
The query
function accepts only strings as parameters, but in SQLite, numbers and strings never compare equal (unless you have type affinity, but this works only for column values, not expressions).
You have to explicitly convert the parameters back to a number:
((...) >> 1 = CAST(? ASINTEGER)) AND ...
Post a Comment for "Android/sqlite - Bit Operation On Where Clause"