thinkphp5.1数据库操作-添加数据

            $data = [
                '字段'=>值,
                '字段2'=>值2,
                '字段3' =>值3
            ];
            Db::name('表名称')->insert($data);

 

posted @ 2020-07-22 14:23  chome  阅读(34)  评论(0)    收藏  举报