[mythtv-users] Mythweb problem

Chris Petersen lists at forevermore.net
Mon Feb 20 05:55:46 UTC 2006


> I just upgraded to mysql5, and my all tv modules have stopped working
> for me.  What I have found is that in programs.php
> load_all_program_data the following query is no longer working.  I am
> using SVN 8627.
> 
> mysql> SELECT program.*, UNIX_TIMESTAMP(program.starttime) AS
> starttime_unix, UNIX_TIMESTAMP(program.endtime) AS endtime_unix,
> CONCAT(repeat(?, program.stars * ?), IF((program.stars * ? * 10) % 10,
> "½", "")) AS starstring, IFNULL(programrating.system, "") AS rater,
> IFNULL(programrating.rating, "") AS rating, oldrecorded.recstatus FROM
> program LEFT JOIN oldrecorded USING (seriesid, programid) LEFT JOIN
> programrating USING (chanid, starttime) WHERE program.chanid='1213'
> AND program.starttime = FROM_UNIXTIME('1140408000') GROUP BY
> program.chanid, program.starttime ORDER BY program.starttime;
> 
> 
> ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near '?, program.stars * ?), IF((program.stars * ? * 10)
> % 10, "½", "")) AS starstring' at line 1
> 
> when the error occurs in PHP, $sh is NULL and $sh->num_rows() causes
> blank pages to be served.  No errors are shown.  Just an empty HTTP
> response.


Um, the ? in that query string are inserted by the db handler a few 
lines down.  You need to replace those ? with the appropriate value 
before testing the query.

-Chris


More information about the mythtv-users mailing list