0
点赞
收藏
分享

微信扫一扫

python插入数据库Mysql 关键字段

IT影子 2022-08-01 阅读 109


INSERT_SQL = """
insert into zt_bug (product,title,keywords,pri,hardware,steps,color,activatedCount,openedDate,openedBuild,assignedDate,deadline,resolvedDate,closedDate,duplicateBug,linkBug,result,testtask,lastEditedDate,openedBy,assignedTo,`case`)

values(8,'%s','errorcode',1,'auto_test','%s','red',0,'%s','trunk','%s','0000-00-00','0000-00-00','0000-00-00',0,'None',0,0,'0000-00-00 00:00:00','%s','%s',0);"""%(title,content,opendate,assigneddate,openedBy,assignedTo)
# logger.info(INSERT_SQL, title, content, opendata, assigneddate)
print(INSERT_SQL)
self.cursor.execute(INSERT_SQL)
self.conn.commit()

举报

相关推荐

0 条评论