示例#1
0
文件: Ids.php 项目: heiglandreas/zf2
 /**
  * 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;
 }
示例#2
0
文件: Db2.php 项目: heiglandreas/zf2
 /**
  * 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;
 }