Untitled
By: a guest | Jul 28th, 2010 | Syntax:
None | Size: 3.10 KB | Hits: 26 | Expires: Never
# Time: 100728 15:06:41
# User@Host: root[root] @ localhost []
# Query_time: 23.345524 Lock_time: 0.000038 Rows_sent: 15923 Rows_examined: 210371
SET timestamp=1280344001;
SELECT DISTINCT c.chanid, c.sourceid, p.starttime, p.endtime, p.title, p.subtitle, p.description, c.channum, c.callsign, c.name, oldrecduplicate, p.category, sched_temp_record.recpriority, sched_temp_record.dupin, recduplicate, findduplicate, sched_temp_record.type, sched_temp_record.recordid, p.starttime - INTERVAL sched_temp_record.startoffset minute AS recstartts, p.endtime + INTERVAL sched_temp_record.endoffset minute AS recendts, p.previouslyshown, sched_temp_record.recgroup, sched_temp_record.dupmethod, c.commmethod, capturecard.cardid, cardinput.cardinputid,p.seriesid, p.programid, p.category_type, p.airdate, p.stars, p.originalairdate, sched_temp_record.inactive, sched_temp_record.parentid, (CASE sched_temp_record.type WHEN 6 THEN sched_temp_record.findid WHEN 9 THEN to_days(date_sub(p.starttime, interval time_format(sched_temp_record.findtime, '%H:%i') hour_minute)) WHEN 10 THEN floor((to_days(date_sub(p.starttime, interval time_format(sched_temp_record.findtime, '%H:%i') hour_minute)) - sched_temp_record.findday)/7) * 7 + sched_temp_record.findday WHEN 7 THEN sched_temp_record.findid ELSE 0 END) , sched_temp_record.playgroup, oldrecstatus.recstatus, oldrecstatus.reactivate, p.videoprop+0, p.subtitletypes+0, p.audioprop+0, sched_temp_record.storagegroup, capturecard.hostname, recordmatch.oldrecstatus, sched_temp_record.avg_delay, c.recpriority + cardinput.recpriority + (cardinput.cardinputid = sched_temp_record.prefinput) * 2 + (p.hdtv > 0 OR FIND_IN_SET('HDTV', p.videoprop) > 0) * 1 + (cardinput.cardinputid = 2 AND
(
c.callsign like 'HBO%'
or
c.callsign like 'SHO%'
or
c.callsign = 'COMEDY'
or
c.callsign = 'IFC'
or
c.callsign = 'TVONE'
or
c.callsign = 'LOGO'
or
c.callsign = 'BET'
or
c.callsign = 'HISTORY'
or
c.callsign = 'TOON'
or
c.callsign = 'G4'
or
c.channum = '209'
or
c.callsign = 'FX'
or
c.channum = '110'
or
c.channum = '372'
)) * 10 AS powerpriority FROM recordmatch INNER JOIN sched_temp_record ON (recordmatch.recordid = sched_temp_record.recordid) INNER JOIN program AS p ON ( recordmatch.chanid = p.chanid AND recordmatch.starttime = p.starttime AND recordmatch.manualid = p.manualid ) INNER JOIN channel AS c ON ( c.chanid = p.chanid ) INNER JOIN cardinput ON (c.sourceid = cardinput.sourceid) INNER JOIN capturecard ON (capturecard.cardid = cardinput.cardid) LEFT JOIN oldrecorded as oldrecstatus ON ( oldrecstatus.station = c.callsign AND oldrecstatus.starttime = p.starttime AND oldrecstatus.title = p.title ) ORDER BY sched_temp_record.recordid DESC;