perl and postgres. . . - Mailing list pgsql-interfaces

From JT Kirkpatrick
Subject perl and postgres. . .
Date
Msg-id 01BE8BEC.76C02840.jt-kirkpatrick@mpsllc.com
Whole thread Raw
Responses Re: [SQL] perl and postgres. . .
Re: [SQL] perl and postgres. . .
List 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.  The field userseq is int4 if that matters to you.
 if I can capture that value in a variable then I can use it in an update
query for that particular record.  Can anyone enlighten me??

jt


pgsql-interfaces by date:

Previous
From: Per Rønne
Date:
Subject: Possible error in libpg++ interface, date[time] fields.
Next
From: Yannick Cote
Date:
Subject: PQprint()