House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Search cf-talk

July 04, 2009

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Home /  Groups /  ColdFusion Talk (CF-Talk)

Is this possible - and the best way possible

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Toby King
05/17/2008 10:35 PM

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.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Mike Chabot
05/18/2008 12:24 AM

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 -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Toby King
05/18/2008 01:53 AM

----- 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>


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists