Handling MySQL BLObs in Python -


I'm accessing a MySQL database (V5.5), which is through a Python program for basic reports . Standard fields (int, vintage, datetime etc.) do not offer any problems - in general I'm putting them in the Python list for later processing. Although a table makes extensive use of blades; These are either binary / html / pdf / png / csv data. My problem is that how to handle them after returning them in a selection statement, binary data needs further processing and PNG may need to be included in a report.

Thank you in advance ...

I have tried various things on the basis of code: -

T related snippets are: -

  the data = open ("/ home / mjh / document / demodata / sjp.bin", 'rb'). Read () SQL = "Include in results (idResults, idClient, TestDateTime, ResultBinary) \ Value (10, 7, '2014-11-05 14:09:11', '% s' cursor. (TheData ,))  

comes back with this: -

  _mysql_exceptions.ProgrammingError: (1064, "There is an error in your SQL syntax; Use the pass '' on line 1 for the correct syntax of your MySQL server version)  


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -