我想更新表的某些字段。
当前我正在写作
email = Email.query.get(email_id)
email.first_name = fieldss[0]
db.session.commit()
有没有办法做到这一点。
email['first_name']= fieldss[0]
编辑
data = ['ge','ppp']
fields = ['first_name','last_name']
for i, field in enumerate(fieldss):
email[field] = data[i]