[mythtv-users] Getting the length of the program form mySQL

Joel Anderson myth at jobless.ca
Fri Dec 12 12:37:18 EST 2003


I didn't look at how mythweb is doing it, but this works for me:

select
title,starttime,endtime,(unix_timestamp(endtime)-unix_timestamp(starttime))/
60 from recorded;

http://www.mysql.com/doc/en/Date_and_time_functions.html

Regards,
Joel Anderson

----- Original Message -----
From: "mythtv" <mythtv at bruce.homelinux.com>
To: <christianh at pdd.edmi.com.au>; "Discussion about mythtv"
<mythtv-users at mythtv.org>
Sent: Friday, December 12, 2003 1:40 AM
Subject: Re: [mythtv-users] Getting the length of the program form mySQL


> That doesnt seem to work for programs that fall over a 2 day span. Start
> recording at 11pm end at 1am the next day.
> Then what?
> Bruce
>
> Christian Hack wrote:
>
> > > Hi,
> > >
> > > I cant seem to find the table that has the length of a
> > > recorded program in the mySQL db.
> > > mythweb has it, but I cnat see where it is grabbing it from.
> > > Anyone have any ideas?
> >
> > endtime - starttime = length.
> >
> > In mythweb it's in /includes/programs.php line 368
> >
> >         // Calculate the duration
> >                 $this->length = $this->endtime - $this->starttime;
> >
> > CH
> >
>
  ------------------------------------------------------------------------
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
>


----------------------------------------------------------------------------
----


_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list