Ajout code de retour

This commit is contained in:
Rodolphe Quiedeville 2003-09-08 10:51:59 +00:00
parent 301808ff19
commit e929a2d9ae

View File

@ -117,29 +117,29 @@ class Product
{ {
$result = $this->db->fetch_array(); $result = $this->db->fetch_array();
$this->id = $result["rowid"]; $this->id = $result["rowid"];
$this->ref = $result["ref"]; $this->ref = $result["ref"];
$this->label = stripslashes($result["label"]); $this->label = stripslashes($result["label"]);
$this->description = stripslashes($result["description"]); $this->description = stripslashes($result["description"]);
$this->price = $result["price"]; $this->price = $result["price"];
$this->tva_tx = $result["tva_tx"]; $this->tva_tx = $result["tva_tx"];
$this->type = $result["fk_product_type"]; $this->type = $result["fk_product_type"];
$this->nbvente = $result["nbvente"]; $this->nbvente = $result["nbvente"];
$this->envente = $result["envente"]; $this->envente = $result["envente"];
$this->duration = $result["duration"]; $this->duration = $result["duration"];
$this->duration_value = substr($result["duration"],0,strlen($result["duration"])-1); $this->duration_value = substr($result["duration"],0,strlen($result["duration"])-1);
$this->duration_unit = substr($result["duration"],-1); $this->duration_unit = substr($result["duration"],-1);
$this->label_url = '<a href="'.DOL_URL_ROOT.'/product/fiche.php3?id='.$this->id.'">'.$this->label.'</a>'; $this->label_url = '<a href="'.DOL_URL_ROOT.'/product/fiche.php3?id='.$this->id.'">'.$this->label.'</a>';
$this->db->free(); $this->db->free();
return 1;
} }
else else
{ {
print $this->db->error(); print $this->db->error();
return -1;
} }
return $result;
} }
/* /*
* *