![]() |
![]() |
|
|
|||||||
| Programmierung Rat & Tat für Programmierer |
![]() |
|
|
Themen-Optionen | Ansicht |
|
|
#1 |
|
Senior Member
![]() Registriert seit: 31.10.2001
Beiträge: 107
|
hallo liste,
ich versuche bilder (JPG, GIF) in ein BLOB feld von mySQL zu speichern das schaut (in python) so aus file = open("c:\\bild.jpg") picture = file.read() sql = 'INSERT INTO tbl_blob (attrName, attrValue) VALUES ("nameOfPicture", ' + picture + ')' conn = CompatMysqldb.Connection("host", "user", "passw", "db") curs = conn.cursor() curs.execute(sql) alle varianten von einfachen und doppelten hochkommas führen zu einem error 1064 - you have an error in your SQL synthax near '' at line 1 __das ganze funktioniert aber mit textfiles__ weiß jemand wie man richtig 'binaries' übergibt ??? danke für alle tipps fritz (-:fs) |
|
|
|
![]() |
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|