I'm not receiving any type of error message. When I check the SQL table after running the script only the first line appears with a snippet of the second line's information appearing in the last column.
Teacher"2,"01
appears in the last column. The snippet of the second line is: 2,"01 (Teacher" from the first line) in the last column and then no other information is input into the database. Is there any more information that is needed?
#------------------------------ db operations
sub execute_it {
my ($dbh, $stmt) = @_;
print "Content-type: text/html\n\n";
print "Here1".Dumper ($dbh, $stmt);
$sth = $dbh->prepare($stmt);
$sth->execute();
return ($sth);
}
Content-type: text/html Here1
$VAR1 = bless( {}, 'DBI::db' );
$VAR2 = 'LOAD DATA LOCAL INFILE "../file.csv" INTO TABLE table_name FI
+ELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY """" LINES TERMINATED B
+Y "\r" IGNORE 1 LINES ';
sub close_db {
my ($dbh, $sth) = shift;
if ($sth) {
$sth->finish();
$dbh->disconnect();
}
}
"Recognizing who we aren't is only the first step toward knowing who we are." - Os Guinness