Subject: | dollar numbered placeholders |
DBI::VERSION:1.50
DBD::Pg::VERSION:1.45
DBD::Pg::st execute failed: called with 2 bind variables when 0 are
needed at /home/fer/test.pl line 13.
Subject: | test.pl |
#!/usr/bin/perl
#!/usr/bin/perl
use DBI;
print "DBI::VERSION:" . $DBI::VERSION;
my $dbh=DBI->connect("dbi:Pg:dbname=template1", "pgsql", "", {AutoCommit => 0});
print "\nDBD::Pg::VERSION:" . $DBD::Pg::VERSION ."\n";
my $sth=$dbh->prepare(qq(SELECT count(*) FROM pg_class WHERE relpages BETWEEN $1 AND $2));
$sth->execute(100,105);