Esempio n. 1
0
 /**
  * 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;
 }
Esempio n. 2
0
 /**
  * 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;
 }