Definition at line 355 of file class_sql_impdol.php.
impdol_operation_transfer_sql::__construct |
( |
|
$p_id = -1 | ) |
|
Definition at line 357 of file class_sql_impdol.php.
References $cn, name, and table.
359 $this->
table =
"impdol.operation_transfer";
360 $this->primary_key =
"ot_id";
374 $this->
default = array(
377 $this->date_format =
"DD.MM.YYYY";
380 parent::__construct($cn,$p_id);
Definition at line 99 of file class_sql_impdol.php.
References $sql, and table.
101 $pk=$this->primary_key;
102 $sql =
" delete from " . $this->
table .
" where " . $this->primary_key .
"=" . sql_string($this->$pk);
103 $this->cn->exec_sql(
$sql);
sql_impdol::from_array |
( |
|
$p_array | ) |
|
|
inherited |
sql_impdol::getp |
( |
|
$p_string | ) |
|
|
inherited |
Definition at line 45 of file class_sql_impdol.php.
References name.
47 if (array_key_exists( $p_string,$this->
name))
49 $idx = $this->
name[$p_string];
53 throw new Exception(__FILE__ .
":" . __LINE__ . $p_string .
'Erreur attribut inexistant '.$p_string);
Definition at line 67 of file class_sql_impdol.php.
References $array, $key, $sql, name, table, and sql_impdol\verify().
70 $sql =
"insert into " . $this->
table .
" ( ";
75 foreach ($this->
name as
$key=>$value)
77 if (isset($this->
default[$value]) && $this->
default[$value] ==
"auto" && $this->$value ==null )
79 if ( $value==$this->primary_key && $this->$value == -1 )
continue;
81 switch ($this->type[$value])
84 $par .=$sep.
'to_date($' . $idx .
",'" . $this->date_format .
"')" ;
87 $par .= $sep.
"$" . $idx ;
94 $sql.=
") values (" . $par .
") returning " . $this->primary_key;
95 $pk=$this->primary_key;
96 $this->$pk = $this->cn->get_value(
$sql,
$array);
if(isset($_POST['remove'])) $array
Definition at line 136 of file class_sql_impdol.php.
References $key, $sql, and name.
Referenced by sql_impdol\__construct().
144 switch ($this->type[$key])
147 $sql .= $sep.
'to_char(' . $key .
",'" . $this->date_format .
"') as ".$key ;
154 $pk=$this->primary_key;
155 $sql.=
" from ".$this->table;
156 $sql.=
" where " . $this->primary_key .
" = " . $this->$pk;
157 $result = $this->cn->get_array(
$sql);
158 if ($this->cn->count() == 0 ) {
163 foreach ($result[0] as $key=>$value) {
sql_impdol::next |
( |
|
$ret, |
|
|
|
$i |
|
) |
| |
|
inherited |
sql_impdol::setp |
( |
|
$p_string, |
|
|
|
$p_value |
|
) |
| |
|
inherited |
Definition at line 56 of file class_sql_impdol.php.
References name.
58 if (array_key_exists( $p_string,$this->
name))
60 $idx = $this->
name[$p_string];
61 $this->$idx = $p_value;
64 throw new Exception(__FILE__ .
":" . __LINE__ . $p_string .
'Erreur attribut inexistant '.$p_string);
Definition at line 106 of file class_sql_impdol.php.
References $array, $key, $sql, name, table, and sql_impdol\verify().
109 $pk=$this->primary_key;
115 foreach ($this->
name as
$key=>$value)
117 if (isset($this->
default[$value]) && $this->
default[$value] ==
"auto" )
119 switch ($this->type[$value])
122 $par =$value.
'=to_date($' . $idx .
",'" . $this->date_format .
"')" ;
125 $par = $value.
"= $" . $idx ;
127 $sql.=$sep.
" $set " . $par ;
129 $sep =
",";$set=
"";$idx++;
131 $sql.=
" where " . $this->primary_key .
" =" . $this->$pk;
if(isset($_POST['remove'])) $array
The documentation for this class was generated from the following file: