Returning a value from an update or insert using DBD::Pg

From: Barry Hoggard <barry(at)hoggard(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Returning a value from an update or insert using DBD::Pg
Date: 2001-07-15 02:52:24
Message-ID: 20010714225224.B2272@panix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I know in Oracle I do something like this:

my $sth = $self->dbh->prepare(qq{ update users set
valid=0,end_date=sysdate
where id='$self->{id}' returning $end_date
into :1});

Is this possible with DBD::Pg?

--
Barry Hoggard

Browse pgsql-novice by date

  From Date Subject
Next Message Henry House 2001-07-16 13:01:15 GROUP BY and aggregate functions
Previous Message Henry House 2001-07-14 17:35:06 Re: Cast question (NULL -> NUMERIC)