On Feb 19, 2014, at 4:20 AM, Dr.Ruud wrote:
> my $sth_4;
> ...
> (untested)

        Thanks for the code but I still get the same error: DBD::mysql::st 
execute failed: You have an error in your SQL syntax;

--------- Long pause for trial and error ----------

        Well with the help of the author, I was able to get it to work.  This 
is the code I used before, based on the CPAN page:

use SQL::SplitStatement;
my @statements = $sql_splitter->split($query_4);
my $sql_string = join ' ', @statements;
my $sth_4 = $dbh->prepare($sql_string);
$sth_4->execute();

and this is the working code that he sent me:

use SQL::SplitStatement;
my @statements = $splitter->split( $query_4 );
foreach my $statement (@statements) {
    $sth_4 = $dbh->prepare($statement);
    $sth_4->execute();
}

        I know I had tried something similar, but it didn't work before and now 
it does.  :\

Thanks,
Frank

http://www.surfshopcart.com/
Setting up shop has never been easier!
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to