lundi 16 mars 2015

Fetching previous entry if particular date value doesn't exist

I want to Fetch Value for the last entry if entry doesn't exist on that date.


For Example:-


Currently what is happening, if i change date to previous and the record doesn't exist is shows me today's or the record which is displayed already. But I want to show last entered record in case the record does not exist.


Another Example..



DATE | GOAL
17 | 320
16 | 420
13 | 300


If user is pressing previous button and he is on 16 then user should get 13 date value on 15, As no Value exist for 15.


Aucun commentaire:

Enregistrer un commentaire