Help for this page

Select Code to Download


  1. or download this
            while (my $row = $csv->getline($fh)) {
                $prep = $db->prepare("INSERT INTO $table VALUES (\"" . joi
    +n('","', $csv->fields()) . "\")")
                        or die "Cannot prepare database " . $db->errstr() 
    +. "\n";
                if (!$prep->execute()) { die "Failed to write row " . $db-
    +>errstr() . "\n"; }
            }
    
  2. or download this
    DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at ./test.pl line 85, <$fh> line 2.