【发布时间】:2022-11-04 23:29:02
【问题描述】:
game=input("enter student name to update report card: ")
nn=game.replace(" ", "_")
mycursor.execute("show tables")
klm = mycursor.fetchall()
if (nn,) in klm:
b=int(input("enter sno: "))
mycursor.execute("select * from {} where sno='{}'".format(nn,b))
xer=mycursor.fetchall()
else:
print("no student record found")
这不执行
if 语句直接转到
否则即使我有
表名 some_one
表明
没有找到记录
【问题讨论】:
标签: python mysql python-3.x replace