Subversion Repositories VORC

Rev

Rev 133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 133 Rev 136
Line 127... Line 127...
127
  while (<$fh>) {
127
  while (<$fh>) {
128
    chomp;
128
    chomp;
129
    my @R = map { s/[^\x00-\x7f]//g; WebDB::trim ($_) } split /,/;
129
    my @R = map { s/[^\x00-\x7f]//g; WebDB::trim ($_) } split /,/;
130
    shift @R if $idtrue;
130
    shift @R if $idtrue;
131
    $R[2] = lc $R[2] if $columnlabels[2] eq "type";
131
    $R[2] = lc $R[2] if $columnlabels[2] eq "type";
132
    push @R, "" if (scalar @R < scalar @columnlabels and eof);
132
#    push @R, "" if (scalar @R < scalar @columnlabels and eof);
-
 
133
    push @R, "" while (scalar @R < scalar @columnlabels and eof);
133
    print "inserting: ", join (" ", @R), $h->br;
134
    print "inserting: ", join (" ", @R), $h->br;
134
    $sth->execute (map { $_ eq '' ? undef : $_ } map { defined $_ ? $_ : undef } @R) or print $sth->errstr;
135
    $sth->execute (map { $_ eq '' ? undef : $_ } map { defined $_ ? $_ : undef } @R) or print "ERROR: ".$sth->errstr.$h->br;
135
  }
136
  }
136
  print "DONE!", $h->br, $h->br;
137
  print "DONE!", $h->br, $h->br;
Line 137... Line 138...
137
  
138