This topic is locked

Weekly View

7/14/2006 8:29:48 PM
PHPRunner General questions
G
gdude66 author

Is it possible to have pages that return weekly results for a user with this week being the default page?

eg 3 fields tha are editable that display 3 goals and whether they have been completed or not for each week.
I would also like a calculated field at the bottom that says - you have completed 2 out of 3 goals this week
Can this be done in phphrunner?

G
giles 7/18/2006

Graeme,

Saw no reply to this post so thought I might suggest something...

Assuming you have MYsql as your database then it should be possilble to return the current week's results by using a WHERE section in your SQL query. try:
WHERE WEEK(DateField)=Week(Now()).
If it is the previous week modify this as:
WHERE WEEK(DateField)=Week(Now()-7)
Should also be possible to return a calcuated field on number of goals completed. To calculate the number of goals completed try:
SELECT SUM(IF(GoalStatus="Completed",1,0)) as goalscompleted from goals
Hope this helps.
Giles

Is it possible to have pages that return weekly results for a user with this week being the default page?

eg 3 fields tha are editable that display 3 goals and whether they have been completed or not for each week.
I would also like a calculated field at the bottom that says - you have completed 2 out of 3 goals this week
Can this be done in phphrunner?