Wouldn't you want to use a variable here instead of a placeholder ??
my $sth = $dbh->prepare(q{
BEGIN select vtr_id into $cursor from t_vertraege
where vtr_nr='$vbb_ver_nr';
END;
});
-----Original Message-----
From: Bart Lateur [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 9:13 AM
To: [EMAIL PROTECTED]
Subject: Re: AW: (not) Too stupid to bind a variable... :-)
On Wed, 23 May 2001 16:02:00 +0200, [EMAIL PROTECTED] wrote:
>What I wanted is:
>
> my $sth = $dbh->prepare(q{
> BEGIN select vtr_id into :1 from t_vertraege
> where vtr_nr='$vbb_ver_nr';
> END;
> });
You may turn this around as much as you like, but you're still trying to
do something for which placeholders were never intended. You want to use
a placeholder for a table name. Placeholders were only intended to
reference field (=column) values. Don't be surprised if anything else
doesn't work: no field names, no table names. That's not what it's for.
Only field values.
--
Bart.
RE: AW: (not) Too stupid to bind a variable... :-)
Jones Robert Contr 81 CS/SCK Wed, 23 May 2001 06:53:56 -0700
- AW: (not) Too stupid to bind a variable... :-... Peter . Bruhn
- Re: AW: (not) Too stupid to bind a varia... Bart Lateur
- RE: AW: (not) Too stupid to bind a varia... Jones Robert Contr 81 CS/SCK
- RE: AW: (not) Too stupid to bind a varia... Steve Sapovits
- Re: AW: (not) Too stupid to bind a varia... wsheldah
- Postgresql transactions Hicham BOUZDAD
- Re: Postgresql transactions Mohammad Shoja
- Re: Postgresql transactions Hicham BOUZDAD
