python语句如下
data 为二进制读取的图片文件
cur.execute("INSERT INTO `data_collect`.`image_data`(`time`, `value`) VALUES (%d, %s)" % (count, pymysql.Binary(data)))
这个是报错信息
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'b'\\xff\\xd8\\xff\\xdb\\x00\\x84\\x00\\x02\\x01\\x01\\x02\\x01\\x01\\x02\\x02\\x01\\x02\\x02\\x02\\x' at line 1")
根据网上的解决办法 去掉了%s的引号 依旧报错 求大佬dian'bo