[mythtv] mythfilldatabase error????

Andrew M. Bishop mythtv-dev@snowman.net
Thu Jan 2 08:58:26 EST 2003


"Mr. Adam ALLEN" <adam@dynamicinteraction.co.uk> writes:

> Didn't find that bit of code- started off with the text books!
> 
> --- filldata.cpp        2003-01-01 18:10:34.000000000 +0000
> +++ patched_filldata.cpp        2003-01-01 18:08:46.000000000 +0000
> @@ -758,6 +758,9 @@
>              (*i).title.replace(QRegExp("\""), QString("\\\""));
>              (*i).subtitle.replace(QRegExp("\""), QString("\\\""));
>              (*i).desc.replace(QRegExp("\""), QString("\\\""));
> +            (*i).title.replace(QRegExp("'"), QString("\\'"));
> +            (*i).subtitle.replace(QRegExp("'"), QString("\\'"));
> +            (*i).desc.replace(QRegExp("'"), QString("\\'""));
> 
>              querystr.sprintf("INSERT INTO program (chanid,starttime,endtime,"
>                               "title,subtitle,description,category) VALUES(%d,"

If you make that patch you must also make a similar patch in the files 
libs/libmyth/programinfo.cpp and programs/mythfrontend/viewscheduled.cpp.

I am very suprised that you need to do this since there are many
programs that use a single quote in the description.  I have never had
any problems with these, only with the double quotes which is why I
escaped them with a backslash in those three files.

Are you sure that this change was the one that stopped the errors and
it was not just coincidence?

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             amb@gedanken.demon.co.uk
                                      http://www.gedanken.demon.co.uk/



More information about the mythtv-dev mailing list