thumbnail
和image
是BLOB字段,num1
和num2
是Integer字段,其他字符是Str。並非在字符串格式化期間轉換的所有參數
我想插入二進制數據到MYSQL。但是,當這條線叫,錯誤發生。
cursor.execute("INSERT INTO image(num1, num2, filename, ext, thumbnail, image) VALUES(?, ?, ?, ?, ?, ?);" , (num1, num2, _name, _ext, _thumb, _image))
錯誤文本:不串轉換過程中的所有參數格式
如何解決呢?請教我。
在http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_load-file – 2011-03-05 13:54:05