ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的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); ```