I am making an android application with sqlite feature but I am not able to return anything with these where statments .
I have the following table:
id day month value1 value2
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:
select * from NomeTabela where ((dia>=15 and mes=valor-1) and (dia<=14 and mes=valor))
Am I doing something wrong?