From 485fb69d4bc3ff8938be938dfc8df808b47faa70 Mon Sep 17 00:00:00 2001 From: jlb Date: Wed, 29 Jan 2003 17:36:37 +0000 Subject: [PATCH] rajout de la fonction fetch_login, pour recupere un adherent d'apres son login de conenction. fonction a tester --- htdocs/adherent.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/adherent.class.php b/htdocs/adherent.class.php index f9741b74fba..b87d4b9aad7 100644 --- a/htdocs/adherent.class.php +++ b/htdocs/adherent.class.php @@ -281,6 +281,19 @@ class Adherent * * */ + /* Fetch adherent corresponding to login passed in argument */ + Function fetch_login($login){ + $sql = "SELECT d.rowid FROM llx_adherent WHERE login='$login' LIMIT 1"; + if ( $this->db->query( $sql) ){ + if ($this->db->num_rows()){ + $obj = $this->db->fetch_object(0); + fetch($obj->rowid); + } + }else{ + print $this->db->error(); + } + } + /* Fetch adherent corresponding to rowid passed in argument */ Function fetch($rowid) { $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.statut, d.public, d.adresse, d.cp, d.ville, d.pays, d.note, d.email, d.login, d.pass, d.naiss, d.photo, d.fk_adherent_type, d.morphy, t.libelle as type";