I can now insert a BLOb into a row using the following code snippets:-
TheData = open("/home/mjh/Documents/DemoData/sjp.bin", 'rb').read()
sql = "Insert into Results (idResults, idClient, TestDateTime, ResultBinary)
Values (10, 7, '2014-11-05 14:09:11', %s)"
cursor.execute(sql, (TheData,))
However I want to put multiple BLObs into the same row and expanded the code to:-
sql = "Insert into Results (idResults, idClient, TestDateTime, ResultBinary, SecondResult)
Values (10, 7, '2014-11-05 14:09:11', %s, %s)"
cursor.execute(sql, (TheData, SecondData,))
This generates the error:-
_mysql_exceptions.OperationalError: (1241, 'Operand should contain 1 column(s)')
This seems a logical change (to me) based on extending the insert to add other field types. Does this mean I have to do an insert (for the first BLOb) followed by an UPDATE (for the second BLOb)?