On 7/13/05, sharif islam <[EMAIL PROTECTED]> wrote:
> On 7/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > you'll need to look at ticket_history. But search for all the rows that 
> > havfe that same ticket_id.
> > After that, you just need to find the create action and the close... and do 
> > the math.
> 
[...]
> 
> 
> | ticket_id | create_time         | change_time
> |      1444 | 2004-11-19 10:06:07 | 2004-11-19 10:06:07 |
> |      1444 | 2004-11-19 10:06:07 | 2004-11-19 10:06:07 |
> |      1444 | 2004-11-19 10:06:07 | 2004-11-19 10:06:07 |
> |      1444 | 2004-11-19 10:44:15 | 2004-11-19 10:44:15 |
> |      1444 | 2004-11-19 10:44:15 | 2004-11-19 10:44:15 |
> |      1444 | 2004-11-19 10:46:06 | 2004-11-19 10:46:06 |
> |      1444 | 2004-11-19 10:46:06 | 2004-11-19 10:46:06 |
> |      1444 | 2004-11-19 10:46:06 | 2004-11-19 10:46:06 |
> |      1444 | 2004-11-19 10:46:06 | 2004-11-19 10:46:06

ok, how about this? 

mysql> select 
max(change_time),min(create_time),datediff(max(change_time),min(create_time))
from ticket_history where ticket_id=1444;
+---------------------+---------------------+---------------------------------------------+
| max(change_time)    | min(create_time)    |
datediff(max(change_time),min(create_time)) |
+---------------------+---------------------+---------------------------------------------+
| 2004-11-19 10:46:06 | 2004-11-16 16:38:14 |                         
                 3 |
+---------------------+---------------------+---------------------------------------------+
_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support oder Consulting für Ihr OTRS System?
=> http://www.otrs.de/

Reply via email to