[mythtv-users] Copy settings from one hostname to another scripts or new MythWEB features
Kevin Kuphal
kuphal at dls.net
Sat May 20 21:06:11 UTC 2006
Steven Adeff wrote:
> On 3/2/06, Chris Petersen <lists at forevermore.net> wrote:
>
>>> 1. Be able to copy all the settings, keybindings, jumppoints, playlists to
>>> another new hostname for a new frontend, bacicly SELECT * from TABLE where
>>> HOSTNAME="myGoodFrontEnd" then INSERT INTO TABLE values SET
>>> HOSTNAME=NewHostName..
>>>
>> REPLACE INTO settings (data, value. hostname)
>> SELECT (data, value, "new_host")
>> FROM settings
>> WHERE hostname = "old_host";
>>
>> (yes, that's one query)
>>
>> It seems that there is no "unique" index on the settings table, so it
>> looks like you might also need:
>>
>> DELETE FROM settings WHERE hostname = "old_host"
>>
>> -Chris
>>
>
> I've run into a situation where I want to do this, but when I run,
>
> REPLACE INTO settings (data, value. hostname) SELECT (data, value,
> "MythCenter") FROM settings WHERE hostname="MythBox";
>
> I get,
> ERROR 1241 (21000): Operand should contain 1 column(s)
>
>
I think that's supposed to be (data, value, hostname) not (data, value.
hostname)
Kevin
More information about the mythtv-users
mailing list