[mythtv-users] Help w/DB error with mythrename since adding .avi's into Recordings

Bobby Gill brownitus at gmail.com
Mon Sep 21 22:16:23 UTC 2009


>
> The only way to fix this is to edit the database directly.  Make sure
>
 you run a backup of the DB before touching it.
>
> To find the records that you need to fix, do something like this:
>
> $  mysql -u mythtv -pmythtv mythconverg
> mysql> select * from recorded where starttime IS NULL;
>
> The 'starttime' field is a datetime with a format of  YYYY-MM-DD
> HH:MM:SS.  More here: http://www.mythtv.org/wiki/Recorded
>
> You'll need to populate these fields with relavant data, as well as
> any other NULL field that should not be NULL.
>
> (Did I mention to do a backup before doing stuff like this?)
>
>
Thanks Joe, yes I have mythconverg_backup running nightly, just ran it again
as well. The field I need to change is chanid, so I tried:


└─> mysql -u mythtv -pmythtv mythconverg
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1292
Server version: 5.1.38 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql> select * from recorded where chanid IS 44;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use
near '44' at line 1
mysql> select * from recorded where chanid IS NULL;
Empty set (0.00 sec)

mysql> select * from recorded where chanid IS #44;
    ->

The recordings that I want to fix all have the chanid as 44 (I accidentally
put it thinking it was asking for the channel number, before I realized it
wanted the chanid which afterward I entered properly as 1042). Now I'm at
the prompt here and unsure what it wants, is it asking me for the new
chanid? I'd rather be sure than fudge up further. Thanks for the help.

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090921/f1506035/attachment.htm>


More information about the mythtv-users mailing list