/usr/local/miolo2/classes/database/firebird/midgenerator.class

Go to the documentation of this file.
00001 <?php
00006 class FirebirdIdGenerator extends MIdGenerator
00007 {
00020     public function getNewId($sequence = 'admin', $tableGenerator = 'cm_sequence')
00021     {
00022         $this->value = $this->getNextValue($sequence);
00023         return $this->value;
00024     }
00025 
00038     public function getNextValue($sequence = 'admin', $tableGenerator = 'cm_sequence')
00039     {
00040         $sql = new sql("gen_id($sequence,1) as id", "RDB\$DATABASE");
00041         $query = $this->db->GetQuery($sql);
00042         $value = $query->fields('id');
00043         return $value;
00044     }
00045 }
00046 ?>
CopyLeft (L) 2001-2006 - [MIOLO Development Team] SOLIS - Cooperativa de Soluções Livres - Lajeado/RS - Brasil