From a396ff68b9fa35abe1779f3cbc2761c9c8291867 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Apr 2005 20:33:30 +0000 Subject: [PATCH] Fix: Plantage requete sql --- htdocs/fourn/fiche.php | 12 ++++++------ htdocs/fourn/product/liste.php | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 6d57a9d9cdc..8ca60fead88 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Éric Seigne - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,11 +22,11 @@ * */ -/*! - \file htdocs/fourn/fiche.php - \ingroup fournisseur, facture - \brief Page de fiche fournisseur - \version $Revision$ +/** + \file htdocs/fourn/fiche.php + \ingroup fournisseur, facture + \brief Page de fiche fournisseur + \version $Revision$ */ require("./pre.inc.php"); diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index 83dd81facdf..41eccd7b3ba 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -22,10 +22,10 @@ */ /** - \file htdocs/fourn/product/liste.php - \ingroup produit - \brief Page liste des produits ou services - \version $Revision$ + \file htdocs/fourn/product/liste.php + \ingroup produit + \brief Page liste des produits ou services + \version $Revision$ */ require("./pre.inc.php"); @@ -58,9 +58,14 @@ if ($_POST["button_removefilter"] == $langs->trans("RemoveFilter")) { $snom=""; } +if ($_GET["fourn_id"] > 0) +{ + $fourn_id = $_GET["fourn_id"]; +} + if (isset($_REQUEST['catid'])) { - $catid = $_REQUEST['catid']; + $catid = $_REQUEST['catid']; } /* @@ -76,12 +81,6 @@ $sql .= ", min(ppf.price) as price"; $sql .= ", s.nom"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; -if ($_GET["fourn_id"] > 0) -{ - $fourn_id = $_GET["fourn_id"]; - $sql .= ", ".MAIN_DB_PREFIX."product_fournisseur as pf"; -} - if ($catid) { $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp";