I am iterating in current days, so need little assistance
for (int I=-1; I<30; I++)
{
for (int J=0; J=30; J++)
{
for (int K=1; K=30; K++)
{
SELECT rowid,Month, Day, Advice
from MainCategory
where Month= 'May '
and Day in ((cast(strftime('%d',date('now','I day')) as Integer)),(cast(strftime('%d',date('now','J day')) as Integer)),(cast(strftime('%d',date('now','K day')) as Integer)));
}
}
}
What if i want to go in reverse order also
for (int I=-1; I<30; I--)
{
for (int J=0; J=30; J--)
{
for (int K=1; K=30; K--)
{
SELECT rowid,Month, Day, Advice
from MainCategory
where Month= 'May ' and Day in ((cast(strftime('%d',date('now','I day')) as Integer)),(cast(strftime('%d',date('now','J day')) as Integer)),(cast(strftime('%d',date('now','K day')) as Integer)));
}
}
}
On every previous click, i want to fetch 3 records so do i need to iterate till 3 or make it on all record 30 in a month from which i want to fetch.