标签:修改 .com lte 技术 div es2017 http image 查询
增加:
user =
db.session.add(user)
db.session.commit()
#增 user = User(username=‘mis1234‘,password=‘111111‘) db.session.add(user) db.session.commit()
查询:
User.query.filter(User.username == ‘mis1114‘).first()
#查 user = User.query.filter(User.username == ‘sk‘).first() print(user.id,user.password)
修改:
user.password = ‘111111‘
db.session.commit()
#改 user = User.query.filter(User.username == ‘mis1234‘).first() user.password=‘888888‘ user.username=‘sk‘ db.session.commit() print(user.id,user.password)
删除:
db.session.delete(user)
db.session.commit()
#删 user = User.query.filter(User.username==‘sk‘).first() db.session.delete(user) db.session.commit()
标签:修改 .com lte 技术 div es2017 http image 查询
原文地址:http://www.cnblogs.com/zsy-97/p/7850659.html