peewee无外键连接

#  参考:https://blog.csdn.net/weixin_34273479/article/details/87587183
res = Name.select(Name, User.xxx).join(User, join_type=JOIN.LEFT_OUTER, on=((User.mcc == Name.mcc) & (Name.day == User.day)))

for x in res:
    print(x.user.xxx)
posted @   nanaindi  阅读(381)  评论(2编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示