[mythtv] What's New listing problem -- oldprogram table not getting filled

Gregorio Gervasio, Jr. gtgj at pacbell.net
Thu Jan 1 04:51:57 EST 2004

>>>>> Bruce Markey writes:

b> Can you pass along SQL that you know will play nice with
b> your system?

I don't really know SQL so there's probably a better way of doing

    CREATE TEMPORARY TABLE tmpoldprogram (
                     oldtitle VARCHAR(128) NOT NULL PRIMARY KEY,
                     airdate TIMESTAMP NOT NULL
    INSERT INTO tmpoldprogram (oldtitle,airdate) 
                     SELECT title,starttime FROM program 
                     LEFT JOIN oldprogram ON title=oldtitle 
                     WHERE oldtitle IS NULL AND starttime < NOW() 
                     group by title;
    INSERT INTO oldprogram (oldtitle,airdate) 
                     SELECT oldtitle,airdate FROM tmpoldprogram;
    DROP TABLE tmpoldprogram;

Gregorio Gervasio, Jr.

More information about the mythtv-dev mailing list