noalyss  Version-6.7.2
Public Member Functions | Data Fields
Fiche_Def_Ref Class Reference

fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref More...

Public Member Functions

 __construct ($p_cn, $p_frd_id=-1)
 Display ()
 Display data between tag.
 Get ()
 Get the data with the p_code and complete the current object.
 Input ()
 Input Data between tag.
 LoadAll ()
 Load all the fiche_def_ref data and return an array of fiche_def_ref objects.
 Save ()
 Store data into the database: update the record.

Data Fields

 $attribut
 $frd_class_base
 $frd_id
 $frd_text

Detailed Description

fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref

Definition at line 29 of file class_fiche_def_ref.php.


Constructor & Destructor Documentation

Fiche_Def_Ref::__construct ( p_cn,
p_frd_id = -1 
)

Definition at line 37 of file class_fiche_def_ref.php.

References db.

    {
        $this->db=$p_cn;
        $this->frd_id=$p_frd_id;
        $this->attribut=array('frd_id','frd_text','frd_class_base');
    }

Member Function Documentation

Display data between tag.

Returns:
string

Definition at line 77 of file class_fiche_def_ref.php.

References $r, and $value.

    {
        $r="";
        foreach ( $this->attribut as $value)
        {
            $r.="<TD>".$this->$value.'</TD>';
        }
        return $r;
    }

Get the data with the p_code and complete the current object.

Returns:
none

Definition at line 126 of file class_fiche_def_ref.php.

References $r, $Res, $sql, db, Database\fetch_array(), and Database\num_row().

    {
        $sql="select * from  fiche_def_ref ".
             " where frd_id=".$this->frd_id;
        $Res=$this->db->exec_sql($sql);
        if ( Database::num_row($Res) == 0 ) return null;
        $r=Database::fetch_array($Res,0);
        $this->frd_text=$r['frd_text'];
        $this->frd_class_base=$r['frd_class_base'];
    }

Input Data between tag.

Returns:
string

Definition at line 92 of file class_fiche_def_ref.php.

References $r, and $w.

    {
        $r="";
        $h=new IHidden();
        $r.='<li>Id          :'.$h->input('frd_id',$this->frd_id).$this->frd_id."</li>";
        $w=new IText();
        $r.='<li>Commentaire  :'.$w->input('frd_text',$this->frd_text)."</li>";
        $t=new IText();
        $r.='<li>Poste de base:'.$t->input('frd_class_base',$this->frd_class_base)."</li>";

        return $r;
    }

Load all the fiche_def_ref data and return an array of fiche_def_ref objects.

Returns:
array

Definition at line 50 of file class_fiche_def_ref.php.

References $all, $array, $idx, $Res, $row, $sql, $value, db, and Database\fetch_all().

    {
        $sql="select * from fiche_def_ref order by frd_id";
        $Res=$this->db->exec_sql($sql);
        $all=Database::fetch_all($Res);
        if ( $Res == false ) return array();
        $idx=0;
        $array=array();
        foreach ($all as $row)
        {
            $o=new Fiche_Def_Ref($this->db);

            foreach (  $this->attribut as  $value)
            {
                $o->$value=$row[$value];
            }
            $array[$idx]=$o;
            $idx++;
        }
        return $array;
    }

Store data into the database: update the record.

  • Returns:
    none

Definition at line 112 of file class_fiche_def_ref.php.

References $Res, $sql, and db.

    {
        $sql="update fiche_def_ref set frd_text=$1 ".
             " ,  frd_class_base=$2 ".
             " where frd_id= $3";
        $Res=$this->db->exec_sql($sql,array($this->frd_text,$this->frd_class_base,$this->frd_id));
    }

Field Documentation

Fiche_Def_Ref::$attribut

array which containing list of attr

Definition at line 34 of file class_fiche_def_ref.php.

Fiche_Def_Ref::$frd_class_base

fiche_def_ref.frd_class_base

Definition at line 33 of file class_fiche_def_ref.php.

Fiche_Def_Ref::$frd_id

$frd_id fiche_def_ref.frd_id

Definition at line 31 of file class_fiche_def_ref.php.

Fiche_Def_Ref::$frd_text

$frd_text fiche_def_ref.frd_tex

Definition at line 32 of file class_fiche_def_ref.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations