| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function batchInsertIgnoreCommand(string $table, array $columns, array $rows) |
||
| 21 | { |
||
| 22 | $sql = \Yii::$app->db->queryBuilder |
||
| 23 | ->batchInsert($table, $columns, $rows); |
||
| 24 | $sql = str_replace('INSERT INTO ', 'INSERT IGNORE INTO ', $sql); |
||
| 25 | |||
| 26 | return \Yii::$app->db->createCommand($sql); |
||
| 27 | } |
||
| 28 | } |