コード例 #1
0
 /**
  * Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT
  * column.
  *
  * As a convention, on RDBMS brands that support sequences
  * (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence
  * from the arguments and returns the last id generated by that sequence.
  * On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method
  * returns the last value generated for such a column, and the table name
  * argument is disregarded.
  *
  * @param string $tableName
  *            OPTIONAL Name of table.
  * @param string $primaryKey
  *            OPTIONAL Name of primary key column.
  * @return string
  */
 public function lastInsertId($tableName = null, $primaryKey = null)
 {
     return $this->adapter->lastInsertId($tableName, $primaryKey);
 }