質問編集履歴

2

追記

2019/04/23 11:54

投稿

masanao2
masanao2

スコア17

test CHANGED
File without changes
test CHANGED
@@ -52,6 +52,18 @@
52
52
 
53
53
  cursor.execute("""INSERT INTO yoyaku (nitizi) VALUES (nitizi3)""")
54
54
 
55
+
56
+
57
+ connection.commit()
58
+
59
+
60
+
61
+ connection.close()
62
+
63
+
64
+
65
+
66
+
55
67
  ```
56
68
 
57
69
 

1

追記

2019/04/23 11:54

投稿

masanao2
masanao2

スコア17

test CHANGED
File without changes
test CHANGED
@@ -32,6 +32,24 @@
32
32
 
33
33
 
34
34
 
35
+ connection = MySQLdb.connect(
36
+
37
+ host="127.0.0.1",
38
+
39
+ port=3306,
40
+
41
+ user='root',
42
+
43
+ passwd='',
44
+
45
+ db='python_db',
46
+
47
+ charset='utf8')
48
+
49
+ cursor = connection.cursor()
50
+
51
+
52
+
35
53
  cursor.execute("""INSERT INTO yoyaku (nitizi) VALUES (nitizi3)""")
36
54
 
37
55
  ```