Solar_Sql_Adapter_Pgsql::lastInsertId()

public int Solar_Sql_Adapter_Pgsql::lastInsertId ( string $table = NULL , string $col = NULL )

Get the last auto-incremented insert ID from the database.

Parameters

  • (string) $table: The table name on which the auto-increment occurred.

  • (string) $col: The name of the auto-increment column.

Returns

  • (int) The last auto-increment ID value inserted to the database.

Description

Get the last auto-incremented insert ID from the database.

Postgres SERIAL and BIGSERIAL types create sequences named in this fashion: {$table}_{$col}_seq.

» http://www.postgresql.org/docs/7.4/interactive/datatype.html#DATATYPE-SERIAL



Local