Blender-Python-MySQL Problem Need HELP

Hello everybody, can someone help me solve this problem?I’m using Blender 2.74 and Python 3.4 with the correct connector to MySQL. By the way, I’m just a beginner in using Blender and Python. What I want is to make a login UI and save the inputted name into the database, but my code seems a bit off or totally wrong. When I run the code, it didn’t save the value in the variable, but when i try to run it in python IDE it worked.Here’s the code:import syssys.path.append(‘C:\Python34\Lib\site-packages’)sys.path.append(‘C:\Python34\DLLs’)import mysql.connectorimport bgebge.render.showMouse(1) cont = bge.logic.getCurrentController()own = cont.owner sensor = cont.sensors [“input”]#this variable suppose to get the inputted namepname = ""db = mysql.connector.connect(user=‘root’, password=’’, host=‘localhost’, database=‘database’)cursor = db.cursor()add_player = ("INSERT INTO table " "(PlayerName) " “VALUES (%s)”)data_player = (pname)cursor.execute(add_player, data_player)#cursor.execute(“INSERT INTO storymode” “(PlayerName)” “VALUES (%(pname)s)”)db.commit() db.close()My questions are:Why it always have an error saying syntax error near the %s;Am I missing something in the code or do i need an add-on/s to make it work properly?Thank you very much for reading my post and for the people who will give their opinions.