model下: $res = \think\Db::name(‘article‘) ->alias("a") //取一个别名 ->join(‘admin ad‘,‘a.aid = ad.admin_id‘) ->field(‘a.aid,ad.admin_id ‘) ->select();
原文地址:https://www.cnblogs.com/qcjdp/p/10837635.html
时间: 2024-10-17 17:35:56
model下: $res = \think\Db::name(‘article‘) ->alias("a") //取一个别名 ->join(‘admin ad‘,‘a.aid = ad.admin_id‘) ->field(‘a.aid,ad.admin_id ‘) ->select();
原文地址:https://www.cnblogs.com/qcjdp/p/10837635.html