I'm using oracle 11g as a DB and idk why my code is not working
@app.route('/add-game', methods=['POST', 'GET'])
def addGame():
if request.method == 'GET':
return render_template('add_game.html')
elif request.method == 'POST':
game_name= request.form['game_name']
print(game_name)
qry = "INSERT INTO GLP.game (game_title) VALUES (:1)"
cur.execute(qry, (game_name))
conn.commit()
return render_template("index.html", context=None)
HERE IS THE ERROR THAT I'M GETTING
line 38, in addGame
cur.execute(qry, ('game_name'))
cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number
127.0.0.1 - - [27/Nov/2022 16:47:58] "POST /add-game HTTP/1.1" 500 -
I need help to solve this issue, Thanks in advance