MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
midgenerator.class
Ir para a documentação deste ficheiro.
1<?php
7{
20 public function getNewId($sequence = 'admin', $tableGenerator = 'cm_sequence')
21 {
22 $this->value = $this->getNextValue($sequence);
23 return $this->value;
24 }
25
38 public function getNextValue($sequence = 'admin', $tableGenerator = 'cm_sequence')
39 {
40 $sql = new sql('value', 'id', "(sequence = '$sequence')");
41 $query = $this->db->GetQuery($sql);
42 $value = $query->fields('value');
43 $nextValue = $value + 1;
44 $this->db->Execute($sql->Update($nextValue));
45 return $value;
46 }
47}
48?>
getNextValue($sequence='admin', $tableGenerator='cm_sequence')
getNewId($sequence='admin', $tableGenerator='cm_sequence')