From: Justin Long <justinlong@strategicnetwork.org>
To: pgsql-sql@postgresql.org
Subject: CURRVAL(INDEX)
Date: Mon, 26 Apr 1999 11:52:44 -0400
Message-ID: <000701be8ffc$d2d8b2a0$0a411a9f@cbn.org> (raw)
I am trying to get the current value of a sequence using PHP3 under Apache.
I've read on the [GENERAL] list that the correct procedure is to
select currval(sequence name)
In my case this would be
$kbid = pg_exec("SELECT currval('knowledge_kbid_seq')");
But when I do this, I don't get the current sequence number. Instead I get a
number that increments by 6 each time I call. Needless to say this is
throwing the rest of my code off quite a bit. Any suggestions or solutions?
Justin Long
Never retreat. Never surrender. Never cut a deal with a dragon.
_______________________________________________________________
Justin Long CIO / Site Editor
616 Station Square Ct Network for Strategic Missions
Chesapeake, VA 23320 977 Centerville Trnpk CSB 317
JustinLong@xc.org Va Beach, VA 23463
Check out our site at: http://www.strategicnetwork.org
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: justinlong@strategicnetwork.org
Subject: Re: CURRVAL(INDEX)
In-Reply-To: <000701be8ffc$d2d8b2a0$0a411a9f@cbn.org>
References: <000701be8ffc$d2d8b2a0$0a411a9f@cbn.org>
* 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