/** * Ids-specific sequence id value * * @param string $sequenceName * @return integer */ public function nextSequenceId($sequenceName) { $sql = 'SELECT ' . $this->_adapter->quoteIdentifier($sequenceName) . '.NEXTVAL FROM ' . 'systables WHERE tabid = 1'; $value = $this->_adapter->fetchOne($sql); return $value; }
/** * Db2-specific sequence id value * * @param string $sequenceName * @return integer */ public function nextSequenceId($sequenceName) { $sql = 'SELECT NEXTVAL FOR ' . $this->_adapter->quoteIdentifier($sequenceName) . ' AS VAL FROM SYSIbm.SYSDUMMY1'; $value = $this->_adapter->fetchOne($sql); return $value; }