join sub union方法支持多重联表查询(不支持混用)

join sub union方法后也支持with relate方法

join + join:查询一条评论和其发布者与所属主题信息

$db->comment->join('user')->on('user_id', 'id')->join('post')->on('user_id', 'id')->get($comment_id)

join + with:查询一个主题及其发布者与评论信息

$db->post->join('user)->on('user_id', 'id')->with('comment')->get($post_id)

results matching ""

    No results matching ""