From: | JT Kirkpatrick <jt-kirkpatrick(at)mpsllc(dot)com> |
---|---|
To: | "'pgsql-interfaces(at)hub(dot)org'" <pgsql-interfaces(at)hub(dot)org>, "'pgsql-sql(at)hub(dot)org'" <pgsql-sql(at)hub(dot)org>, "'chugalug(at)listserv(dot)highertech(dot)net'" <chugalug(at)listserv(dot)highertech(dot)net> |
Subject: | perl and postgres. . . |
Date: | 1999-04-21 15:45:32 |
Message-ID: | 01BE8BEC.76C02840.jt-kirkpatrick@mpsllc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Yannick Cote | 1999-04-21 15:59:03 | PQprint() |
Previous Message | Gene Selkov Jr. | 1999-04-21 15:02:08 | Re: [SQL] perl and postgres. . . |
From | Date | Subject | |
---|---|---|---|
Next Message | JT Kirkpatrick | 1999-04-21 18:34:18 | convert text to number or number to text |
Previous Message | José Soares | 1999-04-21 12:39:45 | Re: [SQL] Update on 6.5 |