Working on a simple product manager and came across a mysql error that for the life of me I can't fix. So the error is, when "new" is in the title of something inserted into PRODUCT_ID, an error like this
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''PRODUCT_ID', price, PRODUCT_URL, image_location ) VALUES ( `...' at line 1")
occurs. Adding quotes did not help, rather confusing.
price = price
PRODUCT_URL = url
image_location = ""
query = f"INSERT INTO PRODUCT ( 'PRODUCT_ID', price, PRODUCT_URL, image_location ) VALUES ( `{PRODUCT_ID}`, '{price}', '{PRODUCT_URL}', '{image_location}')"
cur.execute(query)
print(f"{cur.rowcount} details inserted")
conn.commit()
conn.close()