[mythtv-users] Mythweb not showing program guide

Cj B black at comet.n-polk.k12.ia.us
Sun Mar 19 20:14:06 UTC 2006


On Mar 16, 2006, at 11:43 AM, Cj B wrote:
>
>
> Ok, I turned that off and found the following SQL statement which
> looks like it's supposed to be returning programs but is actually
> returning 0 rows:
> SELECT program.*,
>                           UNIX_TIMESTAMP(program.starttime) AS
> starttime_unix,
>                           UNIX_TIMESTAMP(program.endtime) AS
> endtime_unix,
>                           CONCAT(repeat('star_character',
> program.stars * 'max_stars'),
>                                  IF((program.stars * 'max_stars' *
> 10) % 10,
>                                     "½", "")) AS starstring,
>                           IFNULL(programrating.system, "") AS rater,
>                           IFNULL(programrating.rating, "") AS rating,
>                           oldrecorded.recstatus
>                    FROM program
>                         LEFT JOIN programrating USING (chanid,
> starttime)
>                         LEFT JOIN oldrecorded
>                                   ON LENGTH(IFNULL
> (oldrecorded.seriesid, "")) > 0
>                                      AND LENGTH(IFNULL
> (oldrecorded.programid, "")) > 0
>                                      AND oldrecorded.programid =
> program.programid
>                                      AND oldrecorded.seriesid  =
> program.seriesid
>                   WHERE program.chanid IN
> (1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014 
> ,1
> 015,1016,1017,1018,1019,1020,1021,1022,1023,1024,1025,1026,1027,1028,1 
> 02
> 9,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,104 
> 3,
> 1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057, 
> 10
> 58,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,10 
> 72
> ,1097,1117,1119) AND program.starttime = FROM_UNIXTIME('1142537851')
> GROUP BY program.chanid, program.starttime ORDER BY program.starttime
>

I've found that out of the above query it's this part:
AND program.starttime = FROM_UNIXTIME('1142537851')

that is causing the 0 rows returned. And it's the following lines in  
programs.php which is adding this:
if ($start_time == $end_time)
             $query .= ' AND program.starttime = FROM_UNIXTIME('.$db- 
 >escape($start_time).')';

So I'm wondering what needs to be changed to make this work? It  
appears to me that the program.starttime will never be equal to the  
condition, so perhaps this should be a > and a < then condition instead?

Thanks,
Cj B


More information about the mythtv-users mailing list