質問編集履歴

3

コード修正(Indent間違い)

2021/04/26 08:33

投稿

yujin1202
yujin1202

スコア56

test CHANGED
File without changes
test CHANGED
@@ -150,23 +150,23 @@
150
150
 
151
151
 
152
152
 
153
- sql = "select Country, Agency, email from tb3 where Country='name'";
153
+ <tab> sql = "select Country, Agency, email from tb3 where Country='name'";
154
-
154
+
155
- cursor = connection.cursor()
155
+ <tab> cursor = connection.cursor()
156
-
156
+
157
- cursor.execute(sql)
157
+ <tab> cursor.execute(sql)
158
-
158
+
159
- listx1s = cursor.fetchall()
159
+ <tab> listx1s = cursor.fetchall()
160
160
 
161
161
 
162
162
 
163
- cursor.close()
163
+ <tab> cursor.close()
164
-
164
+
165
- connection.close()
165
+ <tab> connection.close()
166
-
167
-
168
-
166
+
167
+
168
+
169
- return render_template( 'index2.html', listx1s = listx1s)
169
+ <tab> return render_template( 'index2.html', listx1s = listx1s)
170
170
 
171
171
 
172
172
 

2

コードの抜けを修正

2021/04/26 08:33

投稿

yujin1202
yujin1202

スコア56

test CHANGED
File without changes
test CHANGED
@@ -166,7 +166,7 @@
166
166
 
167
167
 
168
168
 
169
- return render_template( 'indexs.html', listx1s = listx1s)
169
+ return render_template( 'index2.html', listx1s = listx1s)
170
170
 
171
171
 
172
172
 

1

誤字修正

2021/04/25 14:20

投稿

yujin1202
yujin1202

スコア56

test CHANGED
@@ -1 +1 @@
1
- 【python+mysql】Select文のwhere句に、動的に変化する単語を挿入する書き方を教えてください。
1
+ 【python+mysql】select文のwhere句に、動的に変化する単語を挿入する書き方を教えてください。
test CHANGED
@@ -56,7 +56,7 @@
56
56
 
57
57
 
58
58
 
59
- 4)国名(この場合は、上記3か国)をSelect文のWhere句に代入して、変数として、情報を取りたいと考え、下記(a)の様にSelect文を書いたのですが、これが動作しません。
59
+ 4)国名(この場合は、上記3か国)をSelect文のwhere句に代入して、変数として、情報を取りたいと考え、下記(a)の様にSelect文を書いたのですが、これが動作しません。
60
60
 
61
61
  (a) sql = "select Country, Agency, email from tb3 where Country='name'";
62
62