/** * insertに使用するprimary idを取得する * * ただし、mysqlの場合はauto_incrementの使用を想定して、nullを返す * * @param string $seq_name * @param bool $ondemand * @return int */ function nextId($seq_name = '', $ondemand = true) { if ($this->db->phptype === 'mysql') { return null; } else { return $this->db->nextId($seq_name, $ondemand); } }
/** * Returns the next free id in a sequence using the standard * PEAR::Db / AdoDb method * * @param string $seq_name name of the sequence * @param boolean $ondemand when true, the seqence is automatically * created if it does not exist * * @return int the next id number in the sequence. * A DB_Error object on failure. * * @see DB_common::nextID(), DB_common::getSequenceName(), * DB_mysql::createSequence(), DB_mysql::dropSequence() */ function nextId_AdoDb($seq_name, $ondemand = true) { return parent::nextId($seq_name, $ondemand); }