-1
I’m making an application on android using sqlite but I’m not able to return anything with these Where statments.
I have the following table:
id day month valu1 valu2
and the following cursor:
resultado = db.rawQuery(
String.format("SELECT * FROM %s
WHERE ((%s>=15 AND %s=%d-1) AND (%s<=14 AND %s=%d))",
NomeTabela, Coluna2, Coluna3, mes, Coluna2, Coluna3, mes),null);
that is to say:
select * from NomeTabela where ((dia>=15 and mes=valor-1) and (dia<=14 and mes=valor))
I’m doing something wrong?
Without knowing which values exist in the table and which should return, we cannot say what is wrong.
– ramaral
In fact, as already mentioned, it shows us the data of the table, so that it is possible to understand what may be happening.
– JMartins