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