Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a5a42ed1

Von Sven Schöling vor fast 12 Jahren hinzugefügt

  • ID a5a42ed1bf23da4a35b675ce00781fea99df2acd
  • Vorgänger 67643d03
  • Nachfolger 5d74fd02

CsvReport: Status mitspeichern

Unterschiede anzeigen:

SL/Controller/CsvImport.pm
276 276
  my $dbh = $::form->get_standard_dbh;
277 277
  $dbh->begin_work;
278 278

  
279
  my $query = 'INSERT INTO csv_import_report_rows (csv_import_report_id, col, row, value) VALUES (?, ?, ?, ?)';
279
  my $query  = 'INSERT INTO csv_import_report_rows (csv_import_report_id, col, row, value) VALUES (?, ?, ?, ?)';
280
  my $query2 = 'INSERT INTO csv_import_report_status (csv_import_report_id, row, type, value) VALUES (?, ?, ?, ?)';
280 281

  
281 282
  my $sth = $dbh->prepare($query);
283
  my $sth2 = $dbh->prepare($query2);
282 284

  
283 285
  # save headers
284 286
  my @headers = (
......
302 304
    $sth->execute($report->id,       $_, $row + 1, $data_row->{info_data}{ $info_methods[$_] }) for 0 .. $#info_methods;
303 305
    $sth->execute($report->id, $o1 + $_, $row + 1, $data_row->{object}->${ \ $methods[$_] })    for 0 .. $#methods;
304 306
    $sth->execute($report->id, $o2 + $_, $row + 1, $data_row->{raw_data}{ $raw_methods[$_] })   for 0 .. $#raw_methods;
307

  
308
    $sth2->execute($report->id, $row + 1, 'information', $_) for @{ $data_row->{information} || [] };
309
    $sth2->execute($report->id, $row + 1, 'errors', $_)      for @{ $data_row->{errors}      || [] };
305 310
  }
306 311

  
307 312
  $dbh->commit;

Auch abrufbar als: Unified diff