在添加游標的時候,添加prepared=True
cursor = mydb.cursor(prepared=True)
感謝博主:
【已解決】Python MySQL: Not all parameters were used in the SQL statement - MoonYear530 - 博客園一、事故緣起 今天構造了一個超過 50 多個參數的 SQL 插入語句,在執行的時候提示 Not all parameters were used in the SQL statement,提示「SQLhttps://www.cnblogs.com/MoonYear530/p/13698763.html