Re: Auto-increment value

From: Date: Wed, 18 Sep 2002 21:34:33 +0000
Subject: Re: Auto-increment value
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-116799@lists.php.net to get a copy of this message
Dear Faisal Abdullah, Once you wrote about "RE: [PHP] Auto-increment value": > > There is a similar one for postgresql as well: pg_last_oid() . > > I tried that. It gives me 24807, instead of 5. > Or is oid is a reference to something else, which would > lead me to the '5' i'm looking for? I'd bet that 24807 is your oid. Check the difference between "SELECT * FROM table;" and "SELECT oid,* FROM table;". HTH. > -- snip snip -- > > if($result = pg_exec($db, $sql)) > { > $query = "success"; > echo "oid : " .pg_last_oid($result); > } > > -- snip snip -- -- Best regards, Leonid Mamtchenkov, RHCE System Administrator Francoudi & Stephanou Ltd. BOFH: somebody was calculating pi on the server

« previous php.general (#116799) next »