thinkphp5---join联合查询

使用thinkphp3.2进行联合查询,join联合查询:

$list = M('document as d')
->join('tp_admin_column as c on d.cid = c.id')
// ->field('d.id,d.cid,d.title,d.url,d.state,d.addtime,d.arc_sort')
->limit(2)
->select();

 

猜你喜欢

转载自www.cnblogs.com/e0yu/p/10923873.html
0条评论
添加一条新回复