lundi 26 octobre 2015

How to specify selectionargs with value from table in Android SQLite?

I want to query all rows with amount >= minamount What I've got is this:

final Cursor cursor = db.rawQuery("SELECT * FROM " + ItemTable.ITEM_TABLE + " WHERE " + ItemTable.ITEM_AMOUNT + " >= " + ItemTable.ITEM_MIN_AMOUNT, null);

But this query doesn't return anything. Does somebody know a way how I can achieve this?

Aucun commentaire:

Enregistrer un commentaire