2011-03-17, 01:27
I have a corrupted mysql xbmc_video database, but the files table is allright.
I made a backup of this table and named it filesbackup. Then I recreated the xbmc_video database by letting xbmc scrape all my files into a new library.
Due to this, I lost my watched status. I'm trying to restore this by inserting the old values from the filesbackup table into the new files table but I'm not really sure how to do this.
So far I wrote this statement:
insert into
files (playcount, lastplayed)
select filesbackup.playcount, filesbackup.lastplayed
from files, filesbackup
where files.strfilename = filesbackup.strfilename
Will this work? Is this statement correct? If not: could someone help me to change it so that it will work?
Thanks!
I made a backup of this table and named it filesbackup. Then I recreated the xbmc_video database by letting xbmc scrape all my files into a new library.
Due to this, I lost my watched status. I'm trying to restore this by inserting the old values from the filesbackup table into the new files table but I'm not really sure how to do this.
So far I wrote this statement:
insert into
files (playcount, lastplayed)
select filesbackup.playcount, filesbackup.lastplayed
from files, filesbackup
where files.strfilename = filesbackup.strfilename
Will this work? Is this statement correct? If not: could someone help me to change it so that it will work?
Thanks!