diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index bf923828c76..012ef84f5f1 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -54,6 +54,9 @@ class ImportCsv extends ModeleImports var $cacheconvert=array(); // Array to cache list of value found after a convertion var $cachefieldtable=array(); // Array to cache list of value found into fields@tables + + var $nbinsert = 0; // # of insert done during the import + var $nbupdate = 0; // # of update done during the import /** @@ -578,17 +581,18 @@ class ImportCsv extends ModeleImports // Run update request $resql=$this->db->query($sql); if($resql) { - echo $sql; - echo '
'; - //print_r($this->db); - //print_r($this->db->db); - echo ''; - echo ''.var_dump($this->db->db->affected_rows).''; if($this->db->db->affected_rows > 0) { $this->nbupdate++; $updatedone = true; } } + else + { + //print 'E'; + $this->errors[$error]['lib']=$this->db->lasterror(); + $this->errors[$error]['type']='SQL'; + $error++; + } } // Update not done, we do insert @@ -605,7 +609,6 @@ class ImportCsv extends ModeleImports $sqlend.=', '.$user->id; } $sql = $sqlstart.$sqlend.')'; - echo $sql; dol_syslog("import_csv.modules", LOG_DEBUG); // Run insert request diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 3eefa101aea..141c83c1ba0 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1461,7 +1461,11 @@ if ($step == 5 && $datatoimport) $db->rollback(); // We force rollback because this was just a simulation. // Show OK - if (! count($arrayoferrors) && ! count($arrayofwarnings)) print img_picto($langs->trans("OK"),'tick').' '.$langs->trans("NoError").'