💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
数据库配置-全局设置 application\database.php 数据库配置-局部设置 application\index\database.php 原生查询 增,删,改,查 execute, query ~~~ insert into user ('name','age') values('jim',18); delete from user where name='jim'; update user set age=20 where name='jim'; select name,age from user where age=18; ~~~ ~~~ use think\Db; ... $sqlStr = "insert into user ('name','age') values('jim',18)"; $result = Db::execute($sqlstr); dump($result); $sqlStr= "show tables from user"; $result = Db::query($sqlstr); dump($result); $sqlStr = "truncate table user"; $result = Db::execute($sqlstr); dump($result); ~~~