Hi,
I am trying to query:
cursor.execute("Select Lpad (%s,5,0)", (24))
which results in error:
mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s,5,0)' at line 1
Same query executes successfully as:
cursor.execute("Select Lpad (24,5,0)")
Platform: Windows
Lib. Build: mysql-connector-python-2.1.6-py2.7-winx64
Python: 2.7.13
I am trying to query:
cursor.execute("Select Lpad (%s,5,0)", (24))
which results in error:
mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s,5,0)' at line 1
Same query executes successfully as:
cursor.execute("Select Lpad (24,5,0)")
Platform: Windows
Lib. Build: mysql-connector-python-2.1.6-py2.7-winx64
Python: 2.7.13