this class is called normally from forecast, a forecast contains category like sales, expenses, each category contains items
More...
|
static | $variable =array ("id"=>"fc_id","order"=>"fc_order","desc"=>"fc_desc","forecast"=>"f_id") |
|
this class is called normally from forecast, a forecast contains category like sales, expenses, each category contains items
- See also
- Forecast
Definition at line 33 of file forecast_cat.class.php.
◆ __construct()
Forecast_Cat::__construct |
( |
|
$p_init, |
|
|
|
$p_id = 0 |
|
) |
| |
◆ delete()
◆ get_info()
Forecast_Cat::get_info |
( |
| ) |
|
◆ get_parameter()
Forecast_Cat::get_parameter |
( |
|
$p_string | ) |
|
Definition at line 47 of file forecast_cat.class.php.
49 if ( array_key_exists($p_string,self::$variable) )
51 $idx=self::$variable[$p_string];
55 throw new Exception(
"Attribut inexistant $p_string");
References $idx.
Referenced by save().
◆ insert()
Definition at line 91 of file forecast_cat.class.php.
93 if ( $this->
verify() != 0 )
return;
95 $sql=
"insert into forecast_cat (fc_desc,fc_order,f_id) ".
96 " values ($1,$2,$3) returning fc_id";
99 array($this->fc_desc,$this->fc_order,$this->f_id)
References $res, $sql, cn, DatabaseCore\fetch_result(), and verify().
Referenced by save().
◆ load()
◆ load_all()
static Forecast_Cat::load_all |
( |
|
$p_cn, |
|
|
|
$p_id |
|
) |
| |
|
static |
Load all the cat.
for a given forecast and return them into a array
- Parameters
-
$p_cn | database connx |
$p_id | is the forecast id (f_id) |
- Returns
- an array with all the data
Definition at line 121 of file forecast_cat.class.php.
123 $sql=
"select fc_id,fc_desc,fc_order from forecast_cat where f_id=$1";
References $p_id, $res, and $sql.
Referenced by Anticipation\form_cat_mod().
◆ make_array()
Forecast_Cat::make_array |
( |
|
$id | ) |
|
◆ save()
◆ set_parameter()
Forecast_Cat::set_parameter |
( |
|
$p_string, |
|
|
|
$p_value |
|
) |
| |
Definition at line 57 of file forecast_cat.class.php.
59 if ( array_key_exists($p_string,self::$variable) )
61 $idx=self::$variable[$p_string];
65 throw new Exception(
"Attribut inexistant $p_string");
References $idx.
◆ test_me()
static Forecast_Cat::test_me |
( |
| ) |
|
|
static |
◆ update()
◆ verify()
◆ $cn
◆ $variable
Forecast_Cat::$variable =array ("id"=>"fc_id","order"=>"fc_order","desc"=>"fc_desc","forecast"=>"f_id") |
|
staticprivate |
The documentation for this class was generated from the following file: