Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Net::Mysql; my $mysql = Net::MySQL->new( hostname => 'linuxserver', database => 'ADMIN', user => 'user', password => 'password' ); $mysql->query(qq{LOAD DATA LOCAL INFILE 'C:\\1.csv' INTO TABLE `ADMIN` +.`temp` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\r\n' }); if ($mysql->is_error) { my $DBError = $mysql->get_error_message; print "MySQL Error : $DBError \n"; } $mysql->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::MySQL will work load data local in file command
by wfsp (Abbot) on Jul 27, 2009 at 16:07 UTC | |
|
Re: Net::MySQL will work load data local in file command
by psini (Deacon) on Jul 27, 2009 at 17:14 UTC |