Im trying to insert values into a table.
eg:
cursor = cnx.cursor()
query = "INSERT INTO info( id, Diet ) VALUES( %s, %s)"
values = [
(1, ??? ),
(2, "Low carb diet"),
(3, "nut allergy"),
Item 1 currently has no information but this could change in the future.
I have tried using "NULL" - this doesn't create a null value it is a string (beginner mistakes :/)
Trying to insert null without quotations classes as an unresolved reference.
Leaving the field empty produces the following
line 329, in _batch_insert
"Failed executing the operation; %s" % err)
mysql.connector.errors.InterfaceError: Failed executing the operation; Could not process parameters
i could insert data one at a time, but id like to know if there was an alternative?