我尝试输入,但显示错误。
引发错误。ProgrammingError(
ProgrammingError: 并非所有参数都在 SQL 语句中使用
我尝试过的一部分代码,
`#D_O_B
import datetime
year = int(input('Enter birth year'))
month = int(input('Enter birth month'))
day = int(input('Enter birth day'))
D_O_B = datetime.date(year, month, day)
#Age
A=int(input("Enter age"))
sql = """INSERT INTO PLAYER_DETAILS(
Name,DATE_OF_BIRTH ,Age ,Federation ,Elo_RATING ,Title)
VALUES ( %s,%d ,(%d %b %y), %s,%d , %s)"""
val = (N,D_O_B,A,Fed,RATING,T)
cursor.execute(sql, val)
db.commit()