diff --git a/htdocs/adherents/adherent_type.class.php b/htdocs/adherents/adherent_type.class.php index 4548c5a542f..4e0f916f1a1 100644 --- a/htdocs/adherents/adherent_type.class.php +++ b/htdocs/adherents/adherent_type.class.php @@ -217,7 +217,7 @@ class AdherentType extends CommonObject $sql = "SELECT rowid, libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type"; - $sql.= "WHERE entity = ".$conf->entity; + $sql.= " WHERE entity = ".$conf->entity; $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 90c392fe1f9..3ff427d5cf4 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -77,6 +77,7 @@ $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " WHERE d.fk_adherent_type = t.rowid "; +$sql.= " AND d.entity = ".$conf->entity; if ($sall) { $sql.=" AND (d.prenom like '%".$sall."%' OR d.nom like '%".$sall."%' OR d.societe like '%".$sall."%'"; @@ -89,7 +90,7 @@ if ($_REQUEST["type"] > 0) } if (isset($_GET["statut"])) { - $sql.=" AND d.statut in ($statut)"; // Peut valoir un nombre ou liste de nombre s�par�s par virgules + $sql.=" AND d.statut in ($statut)"; // Peut valoir un nombre ou liste de nombre separes par virgules } if ( $_POST["action"] == 'search') { @@ -121,7 +122,7 @@ if ($filter == 'outofdate') $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); + $resql = $db->query($sql); if ($resql) $nbtotalofrecords = $db->num_rows($result); else dol_print_error($db); }