Passing special characters into mysql using python
<p>i am trying to pass variables from a list into a mysql table using python. I will get so far down the list untill i receive an eror about a special character. The line of code i am using is:</p>

<pre><code>         new_value = "INSERT INTO favs VALUES ( null, '%s', '%s', '%s', '%s')" % (item1,item2,item3,item4).
</code></pre>

<p>The first item is the problem,as it has numerous variables with apostrophies in them.
Thanks</p>