🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
#### 右连接 right join ~~~ $articles = Be::getTable('cms_category') ->alias('c') ->rightJoin('cms_article AS a', 'a.category_id = c.category_id') ->where('a.category_id', 1) ->where('a.create_time', '>', '2017-12-01') ->getObjects('a.article_id, a.title, c.category_name'); ~~~ 等效SQL: ~~~ SELECT a.article_id, a.title, c.category_name FROM cms_category AS c RIGHT JOIN cms_article AS a ON a.category_id = c.category_id WHERE a.category_id = 1 AND a.create_time > '2017-12-01' ~~~