I am inputting a variable of datatype string in Sqlite database with my Python script.So whenever i am inserting that value i am getting Sqlite error:
sqlite3.OperationalError: near "s": syntax error
My variable string is something like this:
file_path=r'James Bond 007 - 07 - On Her Majesty's Secret Service (1969)'
Actually i am getting this file name directly from os.walk so i can’t escape that single string by putting backslash manually.I want some string method which automatically escapes the content inside string.
You’re doing it wrong.