I'm currently using code like this:
if (strstr($database_type, 'postgres')) {
$id = $db->GetOne("
SELECT CURRVAL('".$table_name."_id_seq') as id
") or die($db->ErrorMsg());
}
else {
$id = $db->Insert_ID();
}
Wherever I insert a record in the database. I don't
know Postgres at all, but I wonder if it would be
possible to abstract this code into the Insert_ID() method?
Logged In: NO
This person could hack it into your driver himself, but still - if there's an upgrade problems appear.
The same about SQLite - it has a 'rowid' for EVERY table, which is taken over by fields declared as (int not null primary key).
It should not be too hard to implement.
Tomasz Gandor