Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub &run_SQL_script { $dbh = DBI->connect($database, $username, $password) or die "Can't connect to database: $DBI::errstr\n"; open (SCRIPT, "$filename"); while (my $data = <SCRIPT>) { $SQLscript = $dbh->prepare(" '$data' "); $SQLscript->execute(); } close (SCRIPT); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SQL Scripts with PERL
by duff (Parson) on Dec 31, 2003 at 18:24 UTC | |
|
Re: SQL Scripts with PERL
by mpeppler (Vicar) on Dec 31, 2003 at 18:38 UTC | |
by Anonymous Monk on Dec 31, 2003 at 19:57 UTC |