Returning oid from PostgreSQL

From: Date: Tue, 20 Jun 2000 00:48:17 +0000
Subject: Returning oid from PostgreSQL
Groups: php.general 
Request: Send a blank email to php-general+get-2261@lists.php.net to get a copy of this message
Hi, after performing a simple SELECT query from a table, I want to get the oid of the tuple obtained from pg_fetch_array(). I know it is possible (using libpq) to get the oid just by treating it as a column called 'oid' in the SQL statement, so under PHP I have tried: $result = pg_Exec($conn, "SELECT * FROM b WHERE name = '$name'"); $row = pg_fetch_array($result, 0); printf("oid is %d\n", $row["oid"]); However, $row["oid"] just returns nothing (note I have taken out error checking for brevity). I do not want to create another column to hold the oid though, as it is already stored internally. So, could someone suggest how I would go about doing this? I would appreciate any feedback on this matter, and would also be grateful if any replies be sent to my email aswell. Thanks, Alex ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

« previous php.general (#2261) next »