Subversion Repositories Applications.annuaire

Compare Revisions

Ignore whitespace Rev 166 → Rev 167

/trunk/modeles/GestionAnnuaireModele.php
24,11 → 24,12
return false;
}
$requete = 'DESCRIBE '.$bdd.'.'.$nom_table;
$requete_presence_table = 'SELECT * FROM information_schema.tables
WHERE TABLE_SCHEMA = '.$this->proteger($bdd).' AND TABLE_NAME = '.$this->proteger($nom_table);
$resultat = $this->requeteUn($requete);
$presence_table = $this->requeteUn($requete_presence_table);
return $resultat;
return $presence_table;
}
public function verifierPresenceChamps($bdd, $nom_table, $champs_a_verifier) {
117,24 → 118,20
}
public function creerTableAnnuaire($informations_table, $informations_champs) {
$nom_bdd = $informations_table['aa_bdd'];
$nom_table = $informations_table['aa_table'];
$nom_bdd = $this->proteger($informations_table['nom_bdd']);
$nom_table = $this->proteger($informations_table['nom_table']);
$champ_id = $informations_champs['aa_champ_id'];
$champ_nom = $informations_champs['aa_champ_nom'];
$champ_mail = $informations_champs['aa_champ_mail'];
$champ_mot_de_passe = $informations_champs['aa_champ_pass'];
$champ_id = $this->proteger($informations_champs['champ_id']);
$champ_nom = $this->proteger($informations_champs['champ_id']);
$champ_mail = $this->proteger($informations_champs['champ_id']);
$champ_mot_de_passe = $this->proteger($informations_champs['champ_id']);
$requete_creation_table = 'CREATE TABLE '.$bdd.'.'.$nom_table.' '.
$requete_creation_table = 'CREATE TABLE '.$nom_bdd.'.'.$nom_table.' '.
'('.$champ_id.' INT NOT NULL AUTO_INCREMENT PRIMARY KEY,'.
$champ_nom.' TEXT NOT NULL,'.
$champ_mail.' TEXT NOT NULL)'.
$champ_mot_de_passe.' TEXT NOT NULL)';
//'ENGINE = MyISAM' ;
echo $requete_creation_table;
exit;
$champ_nom.' VARCHAR(255) NOT NULL, '.
$champ_mail.' VARCHAR(255) NOT NULL, '.
$champ_mot_de_passe.' VARCHAR(255) NOT NULL)';
return $this->requete($requete_creation_table);