35 $Res=$p_cn->exec_sql(
"select * from SKEL.parameter ");
36 for ($i = 0;$i < Database::num_row($Res);$i++)
38 $row=Database::fetch_array($Res,$i);
40 $elt=
$row[
'pr_value'];
55 function save($p_option,$p_value)
59 if ( $this->cn->get_value(
'select count(*) from SKEL.parameter where pr_id=$1',array($p_option)) != 0 )
61 $Res=$this->cn->exec_sql(
"update SKEL.parameter set pr_value=$1 where pr_id=$2",
62 array($p_value,$p_option));
67 $Res=$this->cn->exec_sql(
"insert into SKEL.parameter (pr_id,pr_value) values( $1,$2)",
68 array($p_option,$p_value));
save($p_option, $p_value)
save the parameter into the database by inserting or updating
for($i=0;$i< Database::num_row($ret);$i++) $row