I have a huge data which is stored in mysql db. One of the columns in the database is a long string. One of the strings is "iEdge detected the 'warning' condition 'iedge it" which is stored in string_type. I have to query the database and find how many such strings are there.I am querying from my python program. When I do it using something like
cur.execute("select count(*) from table1 as tmp where tmp.err_string='"+row[r]+"'")
row[r] contains "iEdge detected the 'warning' condition 'iedge it"
I am getting error 1064 (You have an error in your SQL syntax...). I think it is happening because of some quotes in the string. May I know how to fix this?