pg_getlastoid

(PHP 3, PHP 4 >= 4.0.0)

pg_getlastoid -- 마지막 오브젝트 지시자를 돌려준다.

함수 설명

int pg_getlastoid (int result_id)

pg_getlastoid() can be used to retrieve the oid assigned to an inserted tuple if the result identifier is used from the last command sent via pg_exec() and was an SQL INSERT. This function will return a positive integer if there was a valid oid. It will return -1 if an error occured or the last command sent via pg_exec() was not an INSERT.