31 |
my $sth = $dbh->prepare($sql) || die $dbh->errstr(); |
my $sth = $dbh->prepare($sql) || die $dbh->errstr(); |
32 |
ok($sth, "sth"); |
ok($sth, "sth"); |
33 |
|
|
34 |
my $sql_node = "select id from pgest('http://localhost:1978/node/trivia','admin','admin',?,?,?,?,?,array['\@id']) as (id text)"; |
my $sql_node = "select id from pgest('http://localhost:1978/node/trivia','admin','admin',0,?,?,?,?,?,array['\@id']) as (id text)"; |
35 |
my $sth_node = $dbh->prepare($sql_node) || die $dbh->errstr(); |
my $sth_node = $dbh->prepare($sql_node) || die $dbh->errstr(); |
36 |
ok($sth_node, "sth_node"); |
ok($sth_node, "sth_node"); |
37 |
|
|
38 |
sub pgest { |
sub pgest { |
39 |
$sth->execute(@_) || die $sth->errstr(); |
$sth->execute(@_) || die "FATAL ERROR: direct " . $sth->errstr(); |
40 |
$sth_node->execute(@_) || die $sth_node->errstr(); |
$sth_node->execute(@_) || die "FATAL ERROR: node ". $sth_node->errstr(); |
41 |
{ |
{ |
42 |
no warnings; |
no warnings; |
43 |
ok($sth, "execute(".join(",",@_).")"); |
ok($sth, "execute(".join(",",@_).")"); |