MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
midgenerator.class
Ir para a documentação deste ficheiro.
1<?php
7{
11 private $tableGenerator = "cm_sequence";
12
25 public function getNewId($sequence = 'admin', $tableGenerator = 'cm_sequence')
26 {
27 $this->value = $this->getNextValue($sequence, $tableGenerator);
28 return $this->value;
29 }
30
43 public function getNextValue($sequence = 'admin', $tableGenerator = 'cm_sequence')
44 {
45 $sql = new sql("value", $tableGenerator, "sequence='$sequence'");
46 $query = $this->db->GetQuery($sql);
47 $value = $query->fields('value');
48 $sql = new sql("value", $tableGenerator, "sequence='$sequence'");
49 $value++;
50 $this->db->Execute($sql->Update("$value"));
51 return $value;
52 }
53}
54?>
getNextValue($sequence='admin', $tableGenerator='cm_sequence')
getNewId($sequence='admin', $tableGenerator='cm_sequence')