[mythtv] Escaping strings for INSERT statements

Kevin Kuphal kuphal at dls.net
Sun Sep 5 11:45:15 EDT 2004


In working with the log data, I noticed that I get SQL errors when 
inserting log entries with apostrophes, like "Blue's Clues" for the 
title of a show.  Is there a Qt method to escape these strings properly 
that I can put into the LogEntry function or do I need to use some kind 
of regex?  I noticed that the QSqlDriver has a formatValue function but 
I'm not sure that it applies.  I didn't know if other parts of the code 
had a function I could reuse to address this.

Thanks,
Kevin



More information about the mythtv-dev mailing list