26define (
'CODE_EXCP_DUPLICATE',901);
55 $this->
id=$cn->get_next_seq(
'uos_pk_seq');
56 return HtmlInput::hidden($this->
name,$this->
id);
68 $sql=
"insert into tool_uos(uos_value) values ($1)";
70 $cn->exec_sql(
$sql,array($this->
id));
71 }
catch (Exception
$e)
73 throw new Exception(
'Duplicate value');
88 $count=
$cn->get_value(
'select count(*) from tool_uos where uos_value=$1',
99 $count=
$cn->get_value(
'select count(*) from tool_uos where uos_value=$1',
102 }
catch (Exception
$e)
Objec to check a double insert into the database, this duplicate occurs after a refresh of the web pa...
hidden()
return a string with a tag hidden and a uniq value
__construct($p_name)
Constructor $p_name will be set to $this->name, it is also the name of the tag hidden in a form.
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