错误代码:
cursor.execute(
'SELECT * FROM table_code where code=%s',(code)
)
正确代码:
cursor.execute(
'SELECT * FROM table_code where code=%s',(code,)
)
错误代码:
cursor.execute(
'SELECT * FROM table_code where code=%s',(code)
)
正确代码:
cursor.execute(
'SELECT * FROM table_code where code=%s',(code,)
)