0) { /* Skip it it already encoded */ echo "Double skipped : $ref_extrait $detail
"; $LinesDup++; continue; } //-------------------------------------------------------------------- // SQL request to insert into import_tmp // Adapt the format of the import's date in the ** to_date ** function //-------------------------------------------------------------------- $Sql="insert into import_tmp (code, date_exec , date_valeur, montant, devise, compte_ordre, detail, num_compte, bq_account , jrn, status) values ( '$ref_extrait', to_date('$date_exec','DD/MM/YYYY'), to_date('$date_val' ,'DD/MM/YYYY'), $montant, '$devise', '" . addslashes($compte_ordre). "', '".addslashes($detail)."','" .$num_compte." ', '$p_bq_account', $p_jrn, 'n')"; //----------------------------------------------------- // Check if no need to rollback when executing the SQL //----------------------------------------------------- try { ExecSql($p_cn,$Sql) ; } catch (Exception $e) { Rollback($p_cn); echo "Rollbacking : $ref_extrait $detail
"; $LinesSkipped++; break; } //----------------------------------------------------- // The import is OK //----------------------------------------------------- else { $LinesImported++; $row++; echo "Record imported: $ref_extrait $detail
"; } } //----------------------------------------------------- // Close and summary //----------------------------------------------------- fclose($handle); echo "
$LinesImported operation(s) imported, $LinesSkipped text or invalid line(s) skipped, $LinesDup operation(s) skipped as already imported
"; ?>