thinkphp5 框架 插入时主键冲突:insert ignore into
thinkphp5插入数据过滤重复:需更改框架文件:thinkphp\library\think\db\Query.php
搜索:
public function insert
public function insertall在sql下面添加
$sql = str_replace('INSERT INTO', 'INSERT IGNORE INTO', $sql);搜索:
public function insert
public function insertall在sql下面添加
$sql = str_replace('INSERT INTO', 'INSERT IGNORE INTO', $sql);