jeudi 9 avril 2015

Query about sync database columns with days of the week

I'm doing an android studio project and I'm using a SQLite database. In the app I allow the user to Enter their calorie intake for the day. The database would have corresponding columns to hold the users calorie intake for that day. For example, Mondays Calorie intake would be saved in the Monday_Cal column.


My question is how do make the column in which the Calories are being entered change to match the days


Ex:


When monday is over the Column being selected changes from Monday_Cal to Tuesday_Cal.


My original plan was a simple if statement and I presumed there was something I could call on (Clock or Calender) however I cant find any material or tutorials on the area I think I may be searching the wrong phrase?


Aucun commentaire:

Enregistrer un commentaire