|
@@ -90,12 +90,20 @@ if (!function_exists("insertBucleDuplicateOnKey")) {
|
90
|
90
|
|
91
|
91
|
foreach ($fila_archivo as $row) {
|
92
|
92
|
|
|
93
|
+ if ($nombreTabla == "bruto_datos_iniciales" || $nombreTabla == "maestro_datos_iniciales_licitacion") {
|
|
94
|
+ if (is_array($row)) {
|
|
95
|
+ guardar_log($nombreLog, "ID_licitacion-" . $row['id_licitacion']);
|
|
96
|
+ } else {
|
|
97
|
+ guardar_log($nombreLog, "ID_licitacion-" . $row->id_licitacion);
|
|
98
|
+ }
|
|
99
|
+ }
|
|
100
|
+
|
93
|
101
|
$conjunto[] = $row;
|
94
|
102
|
|
95
|
103
|
$contador++;
|
96
|
104
|
|
97
|
105
|
if ($contador % 5000 == 0) {
|
98
|
|
- guardar_log($nombreLog, count($conjunto));
|
|
106
|
+ guardar_log($nombreLog, "Insertados - " . count($conjunto));
|
99
|
107
|
//$CI->db->insert_batch($nombreTabla, $conjunto);
|
100
|
108
|
$CI->db->insert_on_duplicate_update_batch($nombreTabla, $conjunto);
|
101
|
109
|
|
|
@@ -104,7 +112,7 @@ if (!function_exists("insertBucleDuplicateOnKey")) {
|
104
|
112
|
}
|
105
|
113
|
|
106
|
114
|
if (count($conjunto) > 0) {
|
107
|
|
-
|
|
115
|
+ guardar_log($nombreLog, "Insertados - " . count($conjunto));
|
108
|
116
|
//$CI->db->insert_batch($nombreTabla, $conjunto);
|
109
|
117
|
$CI->db->insert_on_duplicate_update_batch($nombreTabla, $conjunto);
|
110
|
118
|
}
|