Re: [SQL] perl and postgres. . .

From: "Gene Selkov Jr(dot)" <selkovjr(at)xnet(dot)com>
To: JT Kirkpatrick <jt-kirkpatrick(at)mpsllc(dot)com>, pgsql-interfaces(at)hub(dot)org
Subject: Re: [SQL] perl and postgres. . .
Date: 1999-04-21 15:02:08
Message-ID: 199904211602.LAA10273@antares.mcs.anl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

> I'm trying in perl to get a maximum value from a field in a postgres table:
> $query="select max(userseq) from dataentry;";
> $result=$conn->exec("$query");
>
> and then capture that value in a scalar variable:
> $userseq=($result);
>
> but it's not working.

$result->getvalue(0, 0)

(pse. read examples in `perldoc Pg`)

Browse pgsql-interfaces by date

  From Date Subject
Next Message JT Kirkpatrick 1999-04-21 15:45:32 perl and postgres. . .
Previous Message Per Rønne 1999-04-21 14:44:09 Possible error in libpg++ interface, date[time] fields.