解决数据库录入时间问题
This commit is contained in:
parent
75313d57a5
commit
90e5cb15e5
@ -53,9 +53,8 @@ def detection_work_day():
|
|||||||
English = test[0]
|
English = test[0]
|
||||||
Chinese = test[1]
|
Chinese = test[1]
|
||||||
works.append(English)
|
works.append(English)
|
||||||
Data = time.strftime("%Y-%m-%d", time.localtime())
|
cursor.execute('insert into Mistake(English, Chinese)\n'
|
||||||
cursor.execute('insert into Mistake(English, Chinese, Date)\n'
|
f"values ('{English}','{Chinese}')")
|
||||||
f"values ('{English}','{Chinese}','{Data}')")
|
|
||||||
cursor.execute(f"update Work set frequency = frequency+1 where English='{English}'")
|
cursor.execute(f"update Work set frequency = frequency+1 where English='{English}'")
|
||||||
conn.commit()
|
conn.commit()
|
||||||
i += 1
|
i += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user