当前位置: 首页>>代码示例>>PHP>>正文


PHP ibase_gen_id函数代码示例

本文整理汇总了PHP中ibase_gen_id函数的典型用法代码示例。如果您正苦于以下问题:PHP ibase_gen_id函数的具体用法?PHP ibase_gen_id怎么用?PHP ibase_gen_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ibase_gen_id函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getInsertId

 /**
  * Retrieves the ID generated for an AUTO_INCREMENT column by the previous INSERT query.
  * @param  string     generator name
  * @return int|FALSE  int on success or FALSE on failure
  */
 public function getInsertId($sequence)
 {
     return ibase_gen_id($sequence, 0, $this->connection);
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:9,代码来源:DibiFirebirdDriver.php

示例2: insert_id

 /**
  * Insert ID
  *
  * @param	string	$generator_name
  * @param	int	$inc_by
  * @return	int
  */
 public function insert_id($generator_name, $inc_by = 0)
 {
     //If a generator hasn't been used before it will return 0
     return ibase_gen_id('"' . $generator_name . '"', $inc_by);
 }
开发者ID:aldsdelram,项目名称:PUPNLPWebsite,代码行数:12,代码来源:ibase_driver.php

示例3: getNextSequence

 /**
  * @brief 1씩 증가되는 sequence값을 return (firebird의 generator 값을 증가)
  **/
 function getNextSequence()
 {
     $gen = "GEN_" . $this->prefix . "sequence_ID";
     $sequence = ibase_gen_id($gen, 1);
     return $sequence;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:9,代码来源:DBFirebird.class.php

示例4: insertId

 public function insertId()
 {
     if (!empty($this->connect)) {
         return ibase_gen_id('id');
     } else {
         return false;
     }
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:8,代码来源:Ibase.php

示例5: genid

 function genid($tablename)
 {
     if ($this->debug) {
         echo "<pre style=\"color : green\">Getting a generator id from {$this->dbpath} <p style=\"color:purple;\"> {$tablename} </p></pre>";
     }
     switch ($this->dbtype) {
         /* Firebird Functionality */
         case "firebird":
             //write some things here
             $id = ibase_gen_id(strtoupper("GEN_" . $tablename . "_ID"), 1, $this->dbh);
             break;
             /* SQLite Functionality */
         /* SQLite Functionality */
         case "sqlite":
             //See how to get an autonumber from a table
             $exist = $this->fetch("select name from sqlite_master where type='table' and upper(name) = upper('{$tablename}')");
             if ($exist->NAME == "") {
                 $this->exec("create table cde_gen (id integer not null, tablename varchar (100) not null, primary key (id, tablename))");
             }
             $id = $this->fetch("select max(id) as maxid from cde_gen where upper(tablename) = upper('{$tablename}')");
             if ($id->MAXID == "") {
                 $newid = 0;
             } else {
                 $newid = $id->MAXID;
             }
             $newid++;
             $this->exec("insert into cde_gen (id, tablename) values ({$newid}, upper('{$tablename}'))");
             $this->commit();
             $id = $newid;
             break;
             /* Oracle Functionality */
         /* Oracle Functionality */
         case "oracle":
             //See how to get an autonumber from a table
             break;
     }
     return $id;
     if ($this->debug) {
         echo "<pre style=\"color : blue\">Getting a generator {$id} \n </pre>";
     }
 }
开发者ID:mortalerror,项目名称:ultimatesims,代码行数:41,代码来源:cdeclass.php

示例6: incrementaGenerator

    protected function incrementaGenerator($nomeGenerator) {
	return ibase_gen_id($nomeGenerator, 1);
    }
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:3,代码来源:modelConexao.php


注:本文中的ibase_gen_id函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。