I have a list and i want to pass all value of list to the where condition of Query.I am using This in Maya Python script Editor using maya cmds
code
list = [1,2,3]
db = MySQLdb.connect("host","root","password","test" )
for num in list:
cursor = db.cursor()
cursor.execute('select Name from project WHERE projectID = %s '%(num))
name = cursor.fetchone()
print(name)
cursor.close()
Error
Error: ProgrammingError: file C:\Program Files\Autodesk\Maya2014\Python\lib\site-packages\MySQLdb\connections.py line 38: 1064 #