Description:
I'm using PHP inorder to calculate the total ammount of hours made in a week, month and year of job.
I have a DB that has many records, each one of them has a total ammount of hours stored (i.e: 2:20), when I sum up two different records (with "SELECT Sec_to_Time(Sum(Time_to_Sec(admin))) AS totssn FROM...") gets summed correctly.
The point of mistake is when I try to sum more records, the mysql db sums it but goes up to 859:59:59, not more than that.
The query I use is:
$global = mysql_query("SELECT Sec_to_Time(Sum(Time_to_Sec(ssn))) AS global FROM ssns WHERE audId = '".$_SESSION['audLogin']."'")
And than to see the query result is "mysql_result($global, 0)".
Again, it works all fine until I get up to 859:59:59 hours after that it stops summing.
How to repeat:
By creating a DB with 50 records, each containing 23:00 hours and by summing them with the query I gave ("SELECT Sec_to_Time(Sum(Time_to_Sec(ssn))) AS global FROM xxx ")
Suggested fix:
See if there is any way of fixing it
Description: I'm using PHP inorder to calculate the total ammount of hours made in a week, month and year of job. I have a DB that has many records, each one of them has a total ammount of hours stored (i.e: 2:20), when I sum up two different records (with "SELECT Sec_to_Time(Sum(Time_to_Sec(admin))) AS totssn FROM...") gets summed correctly. The point of mistake is when I try to sum more records, the mysql db sums it but goes up to 859:59:59, not more than that. The query I use is: $global = mysql_query("SELECT Sec_to_Time(Sum(Time_to_Sec(ssn))) AS global FROM ssns WHERE audId = '".$_SESSION['audLogin']."'") And than to see the query result is "mysql_result($global, 0)". Again, it works all fine until I get up to 859:59:59 hours after that it stops summing. How to repeat: By creating a DB with 50 records, each containing 23:00 hours and by summing them with the query I gave ("SELECT Sec_to_Time(Sum(Time_to_Sec(ssn))) AS global FROM xxx ") Suggested fix: See if there is any way of fixing it