| From: | "Justin Long" <justinlong(at)strategicnetwork(dot)org> |
|---|---|
| To: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | CURRVAL(INDEX) |
| Date: | 1999-04-26 15:52:44 |
| Message-ID: | 000701be8ffc$d2d8b2a0$0a411a9f@cbn.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
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(at)xc(dot)org Va Beach, VA 23463
Check out our site at: http://www.strategicnetwork.org
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael J Davis | 1999-04-26 19:35:16 | RE: [SQL] substring |
| Previous Message | Nuchanard Chiannilkulchai | 1999-04-26 14:57:05 | substring |