AdoDB: how to determine OID of inserted row with Execute()

From: "Jules Alberts" <jules(dot)alberts(at)arbodienst-limburg(dot)nl>
To: pgsql-php(at)postgresql(dot)org
Subject: AdoDB: how to determine OID of inserted row with Execute()
Date: 2002-12-24 12:57:24
Message-ID: 200212241257.gBOCvk2C012966@artemis.cuci.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hello everyone,

I'm using AdoDB to create a PHP interface to a PostgreSQL db. I have a
problem when inserting a row. I do something like this:

connect_to_db();
$return = $db->Execute("insert into foo values ('bar'));
if ($return === false) {
echo $db->ErrorMsg();
} else {
show_row($oid) // here's the problem
}

When I do a succesful INSERT in pgsql, the OID of the inserted row is
echoed. However, according to the manual, the Execute() method allways
returns a recordset. I did a serialize() on $return to see if the OID
is there somewhere, but it isn't. I need the OID to be able to display
the row (with show_row()) after it's inserted.

Does anybody know how to determine the OID of an INSERTed row when
using AdoDB? TIA!

Browse pgsql-php by date

  From Date Subject
Next Message Bruce Young 2002-12-26 02:31:48 table not showing in explorer
Previous Message keeper 2002-12-22 23:10:18 unsubscribe