| @@ 78-82 (lines=5) @@ | ||
| 75 | $exists = $this->model->where($this->key, '=', $row[$this->key])->count(); |
|
| 76 | if (!$exists && !$hasNotNULL) { |
|
| 77 | $values = array(); |
|
| 78 | foreach ($this->columns as $col) { |
|
| 79 | if ($col != $this->key && array_key_exists($col, $row)) { |
|
| 80 | $values[$col] = $row[$col]; |
|
| 81 | } |
|
| 82 | } |
|
| 83 | $newData[] = $values; |
|
| 84 | } else if ($this->status == 2 && $exists) { |
|
| 85 | $values = array(); |
|
| @@ 86-89 (lines=4) @@ | ||
| 83 | $newData[] = $values; |
|
| 84 | } else if ($this->status == 2 && $exists) { |
|
| 85 | $values = array(); |
|
| 86 | foreach ($this->columns as $col) { |
|
| 87 | if (array_key_exists($col, $row)) |
|
| 88 | $values[$col] = $row[$col]; |
|
| 89 | } |
|
| 90 | $updatedData[] = $values; |
|
| 91 | } |
|
| 92 | } |
|