Home > other >  Bosses to look at what's the problem
Bosses to look at what's the problem

Time:09-28

Python to MySQL error

CodePudding user response:

You can try this
 
Cursor=conn. Cursor ()

SQL="" "
INSERT INTO runoob_tb1 (runoob_title runoob_author) VALUES (% s, % s)
"" "% (1, 2)
Cursor. The execute (SQL)
MIT ()
conn.comCursor. The close ()
Conn. Close ()

CodePudding user response:

refer to the second floor Hajo_ response:
can try this
 
Cursor=conn. Cursor ()

SQL="" "
INSERT INTO runoob_tb1 (runoob_title runoob_author) VALUES (% s, % s)
"" "% (1, 2)
Cursor. The execute (SQL)
MIT ()
conn.comCursor. The close ()
Conn. Close ()
position error lack a must now parameters args

CodePudding user response:

 


Cursor=conn. Cursor ()

SQL="" "
INSERT INTO runoob_tb1 (runoob_title runoob_author) VALUES (% s, % s)
"" "
Cursor. The execute (SQL, (1, 2))
MIT ()
conn.comCursor. The close ()
Conn. Close ()


CodePudding user response:

 


Cursor=conn. Cursor ()

SQL="" "
INSERT INTO runoob_tb1 (runoob_title runoob_author) VALUES (% s, % s)
"" "
Ins_data=https://bbs.csdn.net/topics/(' a ', 'b')
Cursor. The execute (SQL, ins_data)
MIT ()
conn.comCursor. The close ()
Conn. Close ()

  • Related