When I run the following code I get an error that "You have an error in your SQL Syntax". Here is my code, what is wrong with it?:
# import MySQL module
import MySQLdb
# connect
db = MySQLdb.connect(host="localhost", user="xxxx", passwd="xxxxxxx",
db="XXXXXXX")
# create a cursor
cursor = db.cursor()
# execute SQL statement
cursor.execute("""INSERT INTO sample table (abc_dx) VALUES ("A simple test")""")
# import MySQL module
import MySQLdb
# connect
db = MySQLdb.connect(host="localhost", user="xxxx", passwd="xxxxxxx",
db="XXXXXXX")
# create a cursor
cursor = db.cursor()
# execute SQL statement
cursor.execute("""INSERT INTO sample table (abc_dx) VALUES ("A simple test")""")