On Oct 14, 6:47 am, [EMAIL PROTECTED] (Pauld) wrote:
> # now connect and get a database handle
> my $dbh = DBI->connect($dsn, $user, $pass) or die "Cant connect to the
> DB: $DBI::errstr\n";
> my $sql="SELECT value FROM res_prior";
> my $sth = $dbh->prepare($sql) or die "cant prepare";
> $sth->execute($sql) or die "cant execute";
>
> and i get a "cant execute" error from  cgi script thats running the
> query.
>

> how do i sort out what the problem is ?

By asking Perl/DBI what you did wrong.

$sth->execute($sql) or die "Can't execute: $DBI::errstr";

Paul Lalli


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to