12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- defined('BASEPATH') or exit('No direct script access allowed');
-
- class Parserdatabaselimpio
- {
-
- protected $CI;
-
- public function __construct()
- {
- $this->CI = &get_instance();
- $this->CI->load->model("Parser_model");
- }
-
- public function index()
- {
- $now = date("Y-m-d_H-i-s");
- $tablasInsert = $this->CI->Parser_model->getMapaTablas();
-
- if ($tablasInsert['num_rows'] > 0) {
-
- foreach ($tablasInsert['datos'] as $row) {
-
- $datosTablaToInsert = $this->CI->Parser_model->getDatosBrutos($row->tabla_sucia);
-
- if ($datosTablaToInsert['num_rows'] > 0) {
- if ($row->tabla_maestra == "maestro_datos_iniciales_licitacion") {
- foreach ($datosTablaToInsert['datos'] as $datos) {
- unset($datos->id);
- }
- }
-
- insertBucleDuplicateOnKey($datosTablaToInsert['datos'], $row->tabla_maestra, "brutoToMaestro_" . $now);
- }
- }
- }
- }
-
- }
-
- /* End of file Parserdatabaselimpio.php */
- /* Location: ./application/libraries/Parserdatabaselimpio.php */
|