From 3774eed3022ae010cc417c59c8f4c5996bd8088a Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 30 Jan 2004 09:58:56 +0000 Subject: [PATCH] Ajout du prefix de nom de table --- htdocs/fourn/facture/paiementfourn.class.php | 8 ++++---- htdocs/paiement.class.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index 1675d4ead4d..1da18c8d49d 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2004 Rodolphe Quiedeville * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -130,15 +130,15 @@ class PaiementFourn if ($filtre == 'crédit') { - $sql = "SELECT id, libelle FROM c_paiement WHERE type IN (0,2) ORDER BY libelle"; + $sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement WHERE type IN (0,2) ORDER BY libelle"; } elseif ($filtre == 'débit') { - $sql = "SELECT id, libelle FROM c_paiement WHERE type IN (1,2) ORDER BY libelle"; + $sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement WHERE type IN (1,2) ORDER BY libelle"; } else { - $sql = "SELECT id, libelle FROM c_paiement ORDER BY libelle"; + $sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement ORDER BY libelle"; } $form->select($name, $sql, $id); } diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index 2ff5779d08a..275a3c252b6 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -80,15 +80,15 @@ class Paiement if ($filtre == 'crédit') { - $sql = "SELECT id, libelle FROM c_paiement WHERE type IN (0,2) ORDER BY libelle"; + $sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement WHERE type IN (0,2) ORDER BY libelle"; } elseif ($filtre == 'débit') { - $sql = "SELECT id, libelle FROM c_paiement WHERE type IN (1,2) ORDER BY libelle"; + $sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement WHERE type IN (1,2) ORDER BY libelle"; } else { - $sql = "SELECT id, libelle FROM c_paiement ORDER BY libelle"; + $sql = "SELECT id, libelle FROM ".MAIN_DB_PREFIX."c_paiement ORDER BY libelle"; } $form->select($name, $sql, $id); }