[mythtv-users] mysql to delete empty channels
Nick
knowledgejunkie at gmail.com
Sun Oct 30 16:23:48 EST 2005
On 30/10/05, Robin Gilks <g8ecj at gilks.org> wrote:
> Does anyone know mysql well enough to tell me how I delete all the
> extranious channels that have no channel number (or null channel number)
> that mythfilldatabase has added in the last month or so?
Check whether this works when you are in MySQL and are using the
mythconverg database:
SELECT * FROM `channel` WHERE `channum` = "";
Per the table structure, channum cannot be NULL, so I'm guessing the
fields are just empty. The above query should therefore give you a
list of all channels that have missing channel numbers.
In order to delete them all in one go, do
DELETE FROM `channel` WHERE `channum` = "";
Remember, backup your DB beforehand and the usual disclaimers apply.
Nick
More information about the mythtv-users
mailing list