pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gene Selkov Jr. <selkovjr@xnet.com>
To: JT Kirkpatrick <jt-kirkpatrick@mpsllc.com>
To: pgsql-interfaces@hub.org
Subject: Re: [SQL] perl and postgres. . .
Date: Wed, 21 Apr 1999 11:02:08 -0400
Message-ID: <199904211602.LAA10273@antares.mcs.anl.gov> (raw)
In-Reply-To: <01BE8BEC.76C02840.jt-kirkpatrick@mpsllc.com>

> 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`)



view thread (4+ messages)  latest in thread

Message-ID: <199904211602.LAA10273@antares.mcs.anl.gov>
Permalink:  ../199904211602.LAA10273@antares.mcs.anl.gov/
Also on:    postgresql.org/message-id/199904211602.LAA10273@antares.mcs.anl.gov

 · 

reply

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: selkovjr@xnet.com, jt-kirkpatrick@mpsllc.com, pgsql-interfaces@hub.org
  Subject: Re: [SQL] perl and postgres. . .
  In-Reply-To: <199904211602.LAA10273@antares.mcs.anl.gov>

* 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