mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
Update Driver.php
修改模型类中使用addAll方法时,第三个replace参数无效问题
This commit is contained in:
@@ -960,7 +960,7 @@ abstract class Driver
|
|||||||
}
|
}
|
||||||
$values[] = 'SELECT ' . implode(',', $value);
|
$values[] = 'SELECT ' . implode(',', $value);
|
||||||
}
|
}
|
||||||
$sql = 'INSERT INTO ' . $this->parseTable($options['table']) . ' (' . implode(',', $fields) . ') ' . implode(' UNION ALL ', $values);
|
$sql = (true === $replace ? 'REPLACE' : 'INSERT') . ' INTO ' . $this->parseTable($options['table']) . ' (' . implode(',', $fields) . ') ' . implode(' UNION ALL ', $values);
|
||||||
$sql .= $this->parseComment(!empty($options['comment']) ? $options['comment'] : '');
|
$sql .= $this->parseComment(!empty($options['comment']) ? $options['comment'] : '');
|
||||||
return $this->execute($sql, $this->getBindParams(true), !empty($options['fetch_sql']) ? true : false);
|
return $this->execute($sql, $this->getBindParams(true), !empty($options['fetch_sql']) ? true : false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user