26define (
'CODE_EXCP_DUPLICATE',901);
59 .
", dbconx=" . $this->dbconx
69 $this->
id=$this->dbconx->get_next_seq(
'uos_pk_seq');
70 return HtmlInput::hidden($this->
name,$this->
id);
81 $sql=
"insert into tool_uos(uos_value) values ($1)";
83 $this->dbconx->exec_sql(
$sql,array($this->
id));
84 }
catch (Exception
$e)
86 throw new Exception(
'Duplicate value');
101 $count=$this->dbconx->get_value(
'select count(*) from tool_uos where uos_value=$1',
112 $count=$this->dbconx->get_value(
'select count(*) from tool_uos where uos_value=$1',
115 }
catch (Exception
$e)
Objec to check a double insert into the database, this duplicate occurs after a refresh of the web pa...
__construct($p_name, $dbconx=-1)
Constructor $p_name will be set to $this->name, it is also the name of the tag hidden in a form.
$dbconx
database connexion
hidden()
return a string with a tag hidden and a uniq value
save($p_array=null)
Try to insert into the table Single_Record.
get_count($p_array=null)
Count how many time we have this->id into the table tool_uos.
const CODE_EXCP_DUPLICATE