[mythtv-users] MySQL help w/deleting a row[entry]

Robert Longbottom RobertCL at iname.com
Wed Nov 25 19:50:37 UTC 2009


Bobby Gill wrote:
> Have been googling and found the MySQL reference manual as well as 
> some blogs, but out of sheer fear for accidentally deleting the wrong 
> thing(s) (if not my entire database lol, though I do have it backed up 
> nightly), just wondering how I can remove this entry:
>
> mysql> select * from recorded where starttime IS NULL;
> +--------+---------------------+---------------------+---------------------------------+---------------------------------+-----------------------------------------+----------+----------+----------+---------+---------+------------+-------------+----------------------------------+----------+----------+-----------+---------------------+----------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+--------------------------------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+
> | chanid | starttime           | endtime             | 
> title                           | subtitle                        | 
> description                             | category | hostname | 
> bookmark | editing | cutlist | autoexpire | commflagged | 
> recgroup                         | recordid | seriesid | programid | 
> lastmodified        | filesize | stars | previouslyshown | 
> originalairdate | preserve | findid | deletepending | transcoder | 
> timestretch | recpriority | 
> basename                                         | progstart           
> | progend             | playgroup | profile | duplicate | transcoded | 
> watched | storagegroup |
> +--------+---------------------+---------------------+---------------------------------+---------------------------------+-----------------------------------------+----------+----------+----------+---------+---------+------------+-------------+----------------------------------+----------+----------+-----------+---------------------+----------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+--------------------------------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+
> |   1024 | 0000-00-00 00:00:00 | 1969-12-31 19:00:00 | 
> john.mayer-clarity.vho.sessions |     Title: 'The Colbert Report' | 
> Found a match between file and database |          | mythbox  |        
> 0 |       0 |       0 |          0 |           0 |     Title: 'The 
> Daily Show with  |     NULL |          |           | 2009-11-16 
> 19:47:44 |        0 |     0 |               0 | NULL            
> |        0 |      0 |             0 |          0 |           1 
> |           0 | 1024_File'/media/myth/44_20080905230000.avi'.avi | 
> 0000-00-00 00:00:00 | 1969-12-31 19:00:00 | Default   |         
> |         0 |          0 |       0 | Default      |
> +--------+---------------------+---------------------+---------------------------------+---------------------------------+-----------------------------------------+----------+----------+----------+---------+---------+------------+-------------+----------------------------------+----------+----------+-----------+---------------------+----------+-------+-----------------+-----------------+----------+--------+---------------+------------+-------------+-------------+--------------------------------------------------+---------------------+---------------------+-----------+---------+-----------+------------+---------+--------------+
> 1 row in set (0.03 sec)
>
> It's a .avi file that I added to the recordings directory but I kinda 
> fudged up on entering myth.rebuilddatabase.pl 
> <http://myth.rebuilddatabase.pl> info (starttime, chanid, etc.) and I 
> would like to remove it completely anyhow. Everytime I delete from the 
> FE, it shows up again, can't get rid of it...
>
>
> Thanks
> Bob
>   
Assuming that select statement really only returns that one row and you 
haven't fudged the results for email purposes...

mysql> delete from recorded where starttime IS NULL;

No warranty, have a backup, blah, blah, blah :-)

Robert



More information about the mythtv-users mailing list