CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 usage report based on timestamps

Print topic Send  topic

Author Message
Ton

Posts: 12
Posted: 02/10/2008, 11:50 AM

Hi, I have build an application which fills a table with timstamps and events. If a device is used I insert a row in the table with a timestamp and a start value. If the device is stopped I insert a new row in the table with a timestamp and a stop value.
I need to build a report to calculate the usage per day, week, month etc.
In the reportbuilder there is no such possibility to compare two entries and calculate the difference.

Anybody an idea or this is possible in CCS?

regards
Ton
_________________
_____________________________________
Origin: NL, CSS4 / PHP / MySQL
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 02/13/2008, 8:16 PM

Ton
This is possible but it will depend on how you are storing the information. I am assuming this information is in the same table, right?? If it is you will probably have to get creative with the query which can definitely give you the information that you need for your report. If you don't mind giving the table layout and a few example records maybe we can help you more...

Oh by the way what database (and version) are you using??
View profile  Send private message
Ton

Posts: 12
Posted: 02/14/2008, 2:44 PM

Hi mamboBROWN,

Indeed, all the usage data is in the same table. Please find a dump of the table at http://www.vhout.net/statusreport.sql

The table layout cab be found at http://www.vhout.net/example.jpg
I am running MySQL version 4.1.15

A start of usage will be a "1" in the colum StatusReportBeamerStatus and a "0" will be representing end of usage.

thnx in advance!
_________________
_____________________________________
Origin: NL, CSS4 / PHP / MySQL
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 02/20/2008, 9:38 PM

Sorry Ton,
My time has gotten away from me (busy on my day job). Do you still need a resolution to this. I can still work it and try to get it to you??
View profile  Send private message
Ton

Posts: 12
Posted: 02/21/2008, 11:48 AM

Hello Mambo,

I still need to resolve this thing. It would be wonderfull if you could give me some hints. I am not requesting you to build this. This is also a "hobby" project for me. Any help is appreciated.
_________________
_____________________________________
Origin: NL, CSS4 / PHP / MySQL
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.