|
| __construct () |
|
| save ($p_option, $p_value) |
| save the parameter into the database by inserting or updating More...
|
|
Definition at line 29 of file class_copro_parameter.php.
Copro_Parameter::__construct |
( |
| ) |
|
Definition at line 32 of file class_copro_parameter.php.
References $cn, $key, and $row.
34 $Res=$cn->exec_sql(
"select * from coprop.parameter ");
35 for ($i = 0;$i < Database::num_row($Res);$i++)
37 $row=Database::fetch_array($Res,$i);
39 $elt=
$row[
'pr_value'];
for($i=0;$i< Database::num_row($ret);$i++) $row
Copro_Parameter::save |
( |
|
$p_option, |
|
|
|
$p_value |
|
) |
| |
save the parameter into the database by inserting or updating
- Parameters
-
$p_attr | give the attribut name |
Definition at line 53 of file class_copro_parameter.php.
References $cn.
57 if ( $cn->get_value(
'select count(*) from coprop.parameter where pr_id=$1',array($p_option)) != 0 )
59 $Res=$cn->exec_sql(
"update coprop.parameter set pr_value=$1 where pr_id=$2",
60 array($p_value,$p_option));
65 $Res=$cn->exec_sql(
"insert into coprop.parameter (pr_id,pr_value) values( $1,$2)",
66 array($p_option,$p_value));
The documentation for this class was generated from the following file: