I tried taking input,but its showing error.
raise errors.ProgrammingError(
ProgrammingError: Not all parameters were used in the SQL statement
A part of code that i tried,
`#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()
pyodbc is open source odbc driver for python will allow you to connect sql, Connect with
then Create Cursor
and then create query like you do in sql query and wherever you want to use user input , replace it with ? add second argument of execute as array and in array put respective values
you can pass multiple argument if you dont want to use array as second argument but it also should be respective
and do commit after insert update or delete
you found more here in official docs Getting Started