|< 1 2 >| | 14 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use DBI;
$dbName= 'testdb';
$dbHost = 'localhost';
$dbUser = 'testuser';
$dbPass = 'testpasswort';
$dsn="dbi:PgPP:dbname=$dbName;host=$dbHost;port=5432";
$dbh=DBI->connect("$dsn","$dbUser","$dbPass") or die "Datenbank nicht erreichbar";
$a='?';
$b="b";
$sql="INSERT INTO test (text1,text2) VALUES (?,?)";
$prep_sql=$dbh->prepare($sql) or die p$dbh->errstr;
$prep_sql->execute($a,$b) or $dbh->errstr;
$prep_sql->finish;
$dbh->trace(2);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
DBI::db=HASH(0x1bc9b24) trace level set to 0x0/2 (DBI @ 0x0/0) in DBI 1.54-ithread (pid 728)
-> quote for DBD::PgPP::db (DBI::db=HASH(0x1bc9b24)~INNER '?') thr#224014
<- quote= ''?'' at PgPP.pm line 361
-> quote for DBD::PgPP::db (DBI::db=HASH(0x1bc9b24)~INNER 'b') thr#224014
<- quote= ''b'' at PgPP.pm line 361
DBD::PgPP::st execute failed: ERROR: syntax error at or near "b''" at character 34
-> errstr in DBD::_::common for DBD::PgPP::db (DBI::db=HASH(0x1bc10e8)~0x1bc9b24) thr#224014
ERROR: 1 'ERROR: syntax error at or near "b''" at character 34
' (err#0)
<- errstr= ( 'ERROR: syntax error at or near "b''" at character 34
' ) [1 items] at test.pl line 21
ERROR: syntax error at or near "b''" at character 34
-> DESTROY for DBD::PgPP::db (DBI::db=HASH(0x1bc9b24)~INNER) thr#224014
ERROR: 1 'ERROR: syntax error at or near "b''" at character 34
' (err#0)
<> FETCH= DBD::PgPP::Protocol=HASH(0x1bc9d04) ('pgpp_connection' from cache) at PgPP.pm line 323
ERROR: 1 'ERROR: syntax error at or near "b''" at character 34
' (err#0)
<- DESTROY= 1
|< 1 2 >| | 14 Einträge, 2 Seiten |