in reply to Re: perl mysql - INSERT INTO, 157 columns
in thread perl mysql - INSERT INTO, 157 columns
How can i edit as per you suggest. I am very beginner to this. Please edit this program as per your sysntax.open (DATA,"<database.csv"); while(my $line = <DATA>) { chomp $line; @array=split(',',$line); my $sth = $dbh->prepare("insert into copy values ('$array[0]', +$array[1],'$array[2]','$array[3]','$array[4]',$array[5],'$array[6]')" +); $sth->execute() or die $DBI::errstr; $sth->finish(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perl mysql - INSERT INTO, 157 columns
by Corion (Patriarch) on Jul 31, 2015 at 07:06 UTC |