![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /usr/share/doc/perl-DBD-MySQL-4.023/eg/ |
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use DBI; my $dsn = "DBI:Pg:database=postgres;host=localhost"; my $dbh = DBI->connect( $dsn, 'postgres', '', { RaiseError => 1 } ) or die $DBI::errstr; $dbh->do('CREATE TABLE buggy ( id INT )'); $dbh->do('INSERT INTO buggy (id) VALUES (1)'); my $ref= $dbh->selectrow_arrayref(<<END, {}, 1); SELECT id FROM buggy -- it's a bug! WHERE id = ? END print Dumper $ref; $dbh->do('DROP TABLE buggy');