|
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Is this possible - and the best way possible
Hi allToby King 05/17/08 10:35 P That is definitely possible and the method of display you suggestedMike Chabot 05/18/08 12:24 A >That is definitely possible and the method of display you suggestedToby King 05/18/08 01:53 A Hi all I have a database table which stores data for completed personal training sessions during completed shifts at a gym. What I have been asked to do is to provide management with a report showing a break down of the number of training sessions per hour during a given shift. I have been able to extract the records for each shift. Whta I am now trying to do is workout the best way to display the data. I have a column in the table which contains the date and a start-time i.e. 2008-05-18 07:31:49 - I think the best will be to display a breakdown of the jobs by hour i.e. all jobs started between 7am to 8am, 8am to 9am etc Thanks in advance Also thinking about using a graph if possible as well. That is definitely possible and the method of display you suggested seems good to me. A graph would be a nice touch. The decision of how best to display the data might rest with the person who has to view it. -Mike Chabot ----- Excess quoted text cut - see Original Post for more ----- ----- Excess quoted text cut - see Original Post for more ----- OK thanks I have now got the records extracted from the database. Have used this code but am not getting the results I am hoping for. This is how the starttime looks in the database - 2008-05-16 22:27:31 <cfquery name="qChartData" datasource="#request.db_dsn#" username="#request.db_login#" password="#request.db_pwd#"> select jobid, j.shiftid, j.personid, roomid, paymentmethodid, starttime, name From tbl_jobs j, tbl_shifts s, tbl_personaltr painers where j.shiftid = s.shiftid AND j.personid = p.personid AND s.shiftid = "F0CB2A8E-16-05-08" AND (j.bookingstatus = 2 OR j.bookingstatus = 3) order by starttime </cfquery> <cfset ws_starttime eq 0> <cfloop query="qChartData"> <cfif qChartData.starttime gt "18:00:00"> <cfset jobctr1 = jobctr1 + 1> </cfif> <cfif qChartData.starttime gt "19:00:00"> <cfset jobctr2 = jobctr2 + 1> </cfif> <cfif qChartData.starttime gt "20:00:00"> <cfset jobctr3 = jobctr3 + 1> </cfif> </cfloop>
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||