/** * 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; }
/** * 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; }