gt.run_sql()是用pymysql 封装的类
distribution_sort_id type: int目的:将此字段值全部修改为NULL
g=2gt.run_sql("update goods set distribution_sort_id=%s;",(g,))修改是成功的 g='null' or g="NULL"gt.run_sql("update goods set distribution_sort_id=%s;",(g,))
会报1366错误 解决方法为g=Nonegt.run_sql("update goods set distribution_sort_id=%s;",(g,))
数据库字段distribution_sort_id 就被修改为Null了