teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

2022/01/14 05:40

投稿

shunxile
shunxile

スコア26

answer CHANGED
@@ -18,4 +18,7 @@
18
18
  }
19
19
  with control_db.cursor(con_db, True) as cursor:
20
20
  cursor.execute(sql,param)
21
- list = cursor.fetchone()
21
+ dict = cursor.fetchone()
22
+
23
+ if dict['cnt'] == 0:
24
+ エラー文追加処理