Qual: Uniformisation de la maniere de recuperer le resultat de requete (suppression des methodes fetch_array au profit de la methode fetch_object)

This commit is contained in:
Laurent Destailleur 2006-06-24 19:58:02 +00:00
parent 790469ee66
commit 31bbeb0368

View File

@ -817,9 +817,9 @@ class Form
$sql.= "where fk_product='".$objp->rowid."' and price_level=".$price_level;
$sql.= " order by date_price DESC limit 1";
$result2 = $this->db->query($sql) ;
$result2 = $this->db->fetch_array($result2);
if($result2["price"])
$opt.= $result2["price"].' '.$langs->trans("Currency".$conf->monnaie);
$objp2 = $this->db->fetch_object($result2);
if ($objp2->price)
$opt.= $objp2->price.' '.$langs->trans("Currency".$conf->monnaie);
else
$opt.= $objp->price.' '.$langs->trans("Currency".$conf->monnaie);
}