MySQL Forums
Forum List  »  Perl

mysql query return null value for unknown reason
Posted by: Alan Van Der Ploeg
Date: July 02, 2011 08:03AM

Ok i'm new to this so bear with me. I have this query...

select TIME_FORMAT(SUM(TIMEDIFF(timeOut,timeIn)),'%H:%i:%S') as workedTime from issue_clock where issue_id="91"

the objective is to return the total time in an hour:min:sec format where issue_id=91 in this case. Here is the table structure with data.

+----+---------------------+---------------------+----------+--------+
| id | timeIn | timeOut | issue_id | status |
+----+---------------------+---------------------+----------+--------+
| 17 | 2011-06-29 21:37:54 | 2011-06-29 23:10:55 | 91 | o |
| 60 | 2011-06-30 20:39:42 | 2011-06-30 22:15:49 | 85 | o |
| 61 | 2011-07-02 09:35:00 | 2011-07-02 09:35:17 | 91 | o |
| 62 | 2011-07-02 09:35:27 | 2011-07-02 09:36:20 | 91 | o |
+----+---------------------+---------------------+----------+--------+


The above query returns a null value. Any ideas why?

Options: ReplyQuote


Subject
Written By
Posted
mysql query return null value for unknown reason
July 02, 2011 08:03AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.