26 require_once NOALYSS_INCLUDE.
'/lib/class_database.php';
27 define (
'CODE_EXCP_DUPLICATE',901);
54 $this->
id=$cn->get_next_seq(
'uos_pk_seq');
67 $sql=
"insert into tool_uos(uos_value) values ($1)";
69 $cn->exec_sql(
$sql,array($this->
id));
70 }
catch (Exception
$e)
72 throw new Exception(
'Duplicate value');
87 $count=$cn->get_value(
'select count(*) from tool_uos where uos_value=$1',
98 $count=$cn->get_value(
'select count(*) from tool_uos where uos_value=$1',
101 }
catch (Exception
$e)
save($p_array=null)
Try to insert into the table Single_Record.
hidden()
return a string with a tag hidden and a uniq value
const CODE_EXCP_DUPLICATE
get_count($p_array=null)
Count how many time we have this->id into the table tool_uos.
Objec to check a double insert into the database, this duplicate occurs after a refresh of the web pa...
__construct($p_name)
Constructor $p_name will be set to $this->name, it is also the name of the tag hidden in a form...