[mythtv-users] Sequence for deleting dropped channels?

Michael T. Dean mtdean at thirdcontact.com
Mon Sep 24 01:14:51 UTC 2007

On 09/23/2007 08:59 PM, Richard Freeman wrote:
> Craig Huff wrote:
>> As soon as
>> the show I'm currently recording finishes, I will go into mythtv-setup and
>> remove them from the DB as Mike "delete all capture cards and re-enter"
>> Dean advised. ;-)
> Is there anything wrong with just doing this?:
> DELETE FROM `channel` USING `channel` LEFT JOIN `program` ON
> `channel`.`chanid` = `program`.`chanid`  WHERE `program`.`chanid` IS NULL ;
> This deletes any channels that do not have any associated programming.
> Granted, you need to wait a little over two weeks after removing a
> channel from your lineup before this will work, but it has the benefit
> that you don't have to re-create all your capture cards.

I don't think he was planning to do a delete all--he was just joking
about how often I say to do one.

>   And you don't
> need to manually delete channels either.

Though he would have to do that.

> What would be the downside of this approach, if any?

Typos.  ;)  (Not that your command has any--I didn't check your
command--but they're always possible when someone is just typing SQL
into a client.)


More information about the mythtv-users mailing list