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