ADOdb Library for PHP Manual
Prev Insert_ID and RowLock Next

Insert_ID( )

Returns the last autonumbering ID inserted. Returns false if function not supported.

Only supported by databases that support auto-increment or object id's, such as PostgreSQL, MySQL and MSSQL currently. PostgreSQL returns the OID, which can change on a database reload.

RowLock($table,$where)

Lock a table row for the duration of a transaction. For example to lock record $id in table1:

	$DB->StartTrans();
	$DB->RowLock("table1","rowid=$id");
	$DB->Execute($sql1);
	$DB->Execute($sql2);
	$DB->CompleteTrans();

Supported in db2, interbase, informix, mssql, oci8, postgres, sybase.


Prev Home Next
Affected_Rows Up GenID

Sponsored by phpLens