//两表联合查询 $Model = M('T1');
$Model->join('left join t2 on t1.cid = t2.id')->select();
// $list = M('linkinfo')->join('LEFT JOIN __LINKCATE__ ON __LINKINFO__.c_id = __LINKCATE__.id')->select(); //三表联合查询 $Model = M('T1');
$Model->join('t2 on t1.id = t2.uid', 'left')->join('t3 on t2.uid = t3.sid', 'left')->select();