Commit d8ac9a55 authored by Feu's avatar Feu
Browse files

mysql ca sert a rien

parent 643ba8e1
...@@ -665,7 +665,7 @@ class utilisateur extends stdentity ...@@ -665,7 +665,7 @@ class utilisateur extends stdentity
function saveinfos () function saveinfos ()
{ {
global $topdir; global $topdir;
$req = new update($this->dbrw, new update($this->dbrw,
"utilisateurs", "utilisateurs",
array('nom_utl' => $this->nom, array('nom_utl' => $this->nom,
'prenom_utl' => $this->prenom, 'prenom_utl' => $this->prenom,
...@@ -687,7 +687,7 @@ class utilisateur extends stdentity ...@@ -687,7 +687,7 @@ class utilisateur extends stdentity
if ( $this->etudiant || $this->ancien_etudiant ) if ( $this->etudiant || $this->ancien_etudiant )
{ {
$req = new update($this->dbrw, new update($this->dbrw,
"utl_etu", "utl_etu",
array('citation' => $this->citation, array('citation' => $this->citation,
'adresse_parents' => $this->adresse_parents, 'adresse_parents' => $this->adresse_parents,
...@@ -701,7 +701,7 @@ class utilisateur extends stdentity ...@@ -701,7 +701,7 @@ class utilisateur extends stdentity
if ( $this->utbm ) if ( $this->utbm )
{ {
$req = new update($this->dbrw, new update($this->dbrw,
"utl_etu_utbm", "utl_etu_utbm",
array('semestre_utbm' => $this->semestre, array('semestre_utbm' => $this->semestre,
'role_utbm' => $this->role, 'role_utbm' => $this->role,
...@@ -713,18 +713,7 @@ class utilisateur extends stdentity ...@@ -713,18 +713,7 @@ class utilisateur extends stdentity
array( 'id_utilisateur' => $this->id)); array( 'id_utilisateur' => $this->id));
} }
$req = new update($this->dbrw, $req = new requete($this->db,"SELECT id_utilisateur FROM utl_extra WHERE id_utilisateur='".mysql_real_escape_string($this->id)."'");
"utl_extra",
array(
'musicien_utl'=>$this->musicien,
'taille_tshirt_utl'=>$this->taille_tshirt,
'permis_conduire_utl'=>$this->permis_conduire,
'date_permis_conduire_utl'=>$this->permis_conduire?$this->date_permis_conduire:null,
'hab_elect_utl'=>$this->hab_elect,
'afps_utl'=>$this->afps,
'sst_utl'=>$this->sst),
array('id_utilisateur' => $this->id));
print_r($req);
if ( $req->lines == 0 ) if ( $req->lines == 0 )
new insert($this->dbrw, new insert($this->dbrw,
"utl_extra", "utl_extra",
...@@ -737,6 +726,20 @@ class utilisateur extends stdentity ...@@ -737,6 +726,20 @@ class utilisateur extends stdentity
'hab_elect_utl'=>$this->hab_elect, 'hab_elect_utl'=>$this->hab_elect,
'afps_utl'=>$this->afps, 'afps_utl'=>$this->afps,
'sst_utl'=>$this->sst)); 'sst_utl'=>$this->sst));
else
new update($this->dbrw,
"utl_extra",
array(
'musicien_utl'=>$this->musicien,
'taille_tshirt_utl'=>$this->taille_tshirt,
'permis_conduire_utl'=>$this->permis_conduire,
'date_permis_conduire_utl'=>$this->permis_conduire?$this->date_permis_conduire:null,
'hab_elect_utl'=>$this->hab_elect,
'afps_utl'=>$this->afps,
'sst_utl'=>$this->sst),
array('id_utilisateur' => $this->id));
if ( XML_RPC_USE ) if ( XML_RPC_USE )
{ {
......
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