Answer the question
In order to leave comments, you need to log in
I want to add a value to the database but it gives an error why?
Here is the code where I want to add the user_id_v variable to the user_id table,
but it writes there is no column, but of course it will not exist if I want to add it :(
con = psycopg2.connect(
host='localhost',
database='Drive_in',
user='postgres',
password='42661902',
port=5432
)
curr = con.cursor()
curr.execute(f"""INSERT INTO users_id (user_id) VALUES ({user_id_v})""")
con.commit()
con.close()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question