From 31bbeb0368430877a25a709215611e06230e1b45 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 Jun 2006 19:58:02 +0000 Subject: [PATCH] Qual: Uniformisation de la maniere de recuperer le resultat de requete (suppression des methodes fetch_array au profit de la methode fetch_object) --- htdocs/html.form.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 89bb2bac258..9d48d427176 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -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); }