企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` $data = Db::table('articles') // as 可省略 ->alias('as a') ->join('categories c', 'a.cate_id = c.id') ->field('a.id, a.title, a.description, a.add_time, a.click, a.thumb, c.cate_name') ->fetchSql(true) ->select(); ``` ```sql SELECT `a`.`id`,`a`.`title`,`a`.`description`,`a`.`add_time`,`a`.`click`,`a`.`thumb`,`c`.`cate_name` FROM `articles` as a INNER JOIN `categories` `c` ON `a`.`cate_id`=`c`.`id`; ```