if pose.all_save_image==0: sql = "INSERT INTO studentmemo.student(idx,pic0) VALUES (%s,%s)" args = (pose.id,crop) cursor.execute(sql,args) conn.commit() else: sql = "UPDATE studentmemo.student SET pic"+str(pose.all_save_image)+"=%s WHERE idx=%s" args = (crop,pose.id) cursor.execute(sql,args) conn.commit()
标签:args,数据库,pose,写入,crop,studentmemo,sql,image,图片 From: https://www.cnblogs.com/hahaah/p/17275570.html