From: JT Kirkpatrick <jt-kirkpatrick@mpsllc.com>
To: 'pgsql-interfaces@hub.org' <pgsql-interfaces@hub.org>
To: 'pgsql-sql@hub.org' <pgsql-sql@hub.org>
To: 'chugalug@listserv.highertech.net' <chugalug@listserv.highertech.net>
Subject: perl and postgres. . .
Date: Wed, 21 Apr 1999 11:45:32 -0400
Message-ID: <01BE8BEC.76C02840.jt-kirkpatrick@mpsllc.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: jt-kirkpatrick@mpsllc.com, pgsql-interfaces@hub.org, pgsql-sql@hub.org, chugalug@listserv.highertech.net
Subject: Re: perl and postgres. . .
In-Reply-To: <01BE8BEC.76C02840.jt-kirkpatrick@mpsllc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox