Commit 387ea632 authored by mbriand's avatar mbriand
Browse files

bleh

parent fcedc98c
......@@ -163,7 +163,9 @@ class utilisateur extends stdentity
function load_all_by_id ( $id )
{
$req = new requete($this->db,
"SELECT *, `utilisateurs`.`id_utilisateur` `id_utilisateur` ".
"SELECT `utl_etu`.*, `utl_etu_utbm`.*, `utl_extra`.*, `utilisateurs`.* ".
"`utl_etu`.`id_ville` AS `id_ville_parent` ".
"`utl_etu`.`id_pays` AS `id_pays_parent` ".
"FROM utilisateurs ".
"LEFT JOIN `utl_etu` ON (`utilisateurs`.`id_utilisateur`=`utl_etu`.`id_utilisateur`) ".
"LEFT JOIN `utl_etu_utbm` ON (`utilisateurs`.`id_utilisateur`=`utl_etu_utbm`.`id_utilisateur`) ".
......@@ -421,8 +423,8 @@ class utilisateur extends stdentity
{
$this->citation = $row["citation"];
$this->adresse_parents = $row["adresse_parents"];
$this->id_ville_parents = $row["id_ville"];
$this->id_pays_parents = $row["id_pays"];
$this->id_ville_parents = $row["id_ville_parents"];
$this->id_pays_parents = $row["id_pays_parents"];
$this->tel_parents = $row["tel_parents"];
$this->nom_ecole_etudiant = $row["nom_ecole_etudiant"];
}
......@@ -789,7 +791,9 @@ class utilisateur extends stdentity
function load_all_extra ()
{
$req = new requete($this->db,
"SELECT `utl_etu`.*, `utl_etu_utbm`.*, `utl_extra`.* ".
"SELECT `utl_etu`.*, `utl_etu_utbm`.*, `utl_extra`.*, ".
"`utl_etu`.`id_ville` AS `id_ville_parent`, ".
"`utl_etu`.`id_pays` AS `id_pays_parent` ".
"FROM utilisateurs ".
"LEFT JOIN `utl_etu` ON (`utilisateurs`.`id_utilisateur`=`utl_etu`.`id_utilisateur`) ".
"LEFT JOIN `utl_etu_utbm` ON (`utilisateurs`.`id_utilisateur`=`utl_etu_utbm`.`id_utilisateur`) ".
......
<?
$topdir = "../";
require_once($topdir . "include/cts/user.inc.php");
$site = new site ();
$user = new utilisateur($site->db,$site->dbrw);
$user->load_all_by_id($_REQUEST["id_utilisateur"]);
echo $user->id."\n";
echo $user->id_ville."\n";
echo $user->id_pays."\n";
echo $user->id_ville_parents."\n";
echo $user->id_pays_parents."\n";
echo "--------\n";
$user = new utilisateur($site->db,$site->dbrw);
$user->load_by_id($_REQUEST["id_utilisateur"]);
$user->load_all_extras();
echo $user->id."\n";
echo $user->id_ville."\n";
echo $user->id_pays."\n";
echo $user->id_ville_parents."\n";
echo $user->id_pays_parents."\n";
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment