企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
``` $mysql = Db::getInstance()->init('pool'); ``` #### insert(array $data, $buildSql = false) ,单条插入,返回插入后的id号 ``` $data = $mysql->table('table')->insert([ 'uid' => 123, 'type' => 1, 'currency' => 10 ]); ``` #### insertAll(array $data, $buildSql = false),批量插入,返回插入的总条数 ``` $data = [ ['uid' => 123,'type' => 1,'currency' => 10], ['uid' => 222,'type' => 2,'currency' => 20] ]; $mysql->table('table')->insertAll($data); ```