33require_once NOALYSS_INCLUDE.
"/database/forecast_category_sql.class.php";
40 parent::__construct($p_table);
41 $this->forecast_id=-1;
63 fc_id=$1",array(
$p_id));
90 $nb_element=
$cn->get_value(
"select count(*) from forecast_item where fc_id=$1",
92 printf(_(
"Utilisation %s"),$nb_element);
101 if (trim (
$object->getp(
"fc_desc") ) ==
"" ) {
102 $this->
set_error(
"fc_desc", _(
"Nom ne peut être vide"));
105 $dupl=
$cn->get_value(
"select count(*) from forecast_category
107 upper(replace (fc_desc,' ',''))= upper(replace ($2,' ',''))
108 and fc_id != $1 and f_id=$3",[
$object->fc_id,
$object->fc_desc,$this->forecast_id]);
111 $this->
set_error(
"fc_desc", _(
"Ce nom existe déjà"));
114 if ( trim(
$object->fc_order) ==
'') {
115 $object->fc_order=
$cn->get_value(
"select max(fc_order) from forecast_category where f_id=$1",
118 if (
$err > 0 ) {
return false;}
catch(Exception $e) $forecast_category
this an abstract class , all the SQL class, like noalyss_sql (table), Acc_Plan_SQL (based on a SQL no...
display, add, delete and modify forecast category
input()
display into a dialog box the datarow in order to be appended or modified.
__construct(Data_SQL $p_table)
set_forecast_id($forecast_id)
ORM abstract of the table public.forecast_category.
Purpose is to propose a librairy to display a table content and allow to update and delete row ,...
add_json_param($p_attribute, $p_value)
Add json parameter to the current one.
set_error($p_col, $p_message)
set the error message for a wrong input