コード例 #1
0
ファイル: table.php プロジェクト: fchaose/qeephp
 /**
  * 为当前数据表的指定字段产生一个序列值
  *
  * @param $field_name
  *
  * @return mixed
  */
 function nextID($field_name = null)
 {
     if (!$this->_inited) {
         $this->init();
     }
     if (is_null($field_name)) {
         $field_name = $this->_pk[0];
     }
     return $this->_conn->nextID($this->getFullTableName(), $field_name);
 }
コード例 #2
0
ファイル: abstract.php プロジェクト: Debenson/openwan
 function testInsertID2()
 {
     $id = $this->dbo->nextID('testseq', 'id');
     $insertID = $this->dbo->insertID();
     $this->assertEquals($id, $insertID, '$id == $insertID');
 }