Received: from mail.STRATEGICNETWORK.ORG ([216.1.60.176]) by hub.org (8.9.3/8.9.1) with ESMTP id LAA35524 for ; Mon, 26 Apr 1999 11:55:13 -0400 (EDT) (envelope-from justinlong@strategicnetwork.org) Received: from nsmjustinlong [159.26.240.128] by mail.STRATEGICNETWORK.ORG (SMTPD32-5.01) id ADB611F010A; Mon, 26 Apr 1999 12:00:54 EDT Reply-To: From: "Justin Long" To: Subject: CURRVAL(INDEX) Date: Mon, 26 Apr 1999 11:52:44 -0400 Message-ID: <000701be8ffc$d2d8b2a0$0a411a9f@cbn.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Importance: Normal 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