说明
原生SQL操作-写入
示例
Db::execute(‘insert into think_user (id, name) values (?, ?)‘,[8,‘thinkphp‘]);
占位符
Db::execute(‘insert into think_user (id, name) values (:id, :name)‘,[‘id‘=>8,‘name‘=>‘thinkphp‘]);
时间: 2024-10-26 13:35:52
说明
原生SQL操作-写入
示例
Db::execute(‘insert into think_user (id, name) values (?, ?)‘,[8,‘thinkphp‘]);
占位符
Db::execute(‘insert into think_user (id, name) values (:id, :name)‘,[‘id‘=>8,‘name‘=>‘thinkphp‘]);