Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 634 | Rev 637 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 634 Rev 636
Line 31... Line 31...
31
				case 'chargerTous' :
31
				case 'chargerTous' :
32
					$this->chargerStructureSql();
32
					$this->chargerStructureSql();
33
					$this->chargerBdtxa();
33
					$this->chargerBdtxa();
34
					$this->genererChpNomSciHtml();
34
					$this->genererChpNomSciHtml();
35
					$this->genererChpFamille();
35
					$this->genererChpFamille();
-
 
36
					$this->genererChpNomComplet();
36
					break;
37
					break;
37
				case 'chargerStructureSql' :
38
				case 'chargerStructureSql' :
38
					$this->chargerStructureSql();
39
					$this->chargerStructureSql();
39
					break;
40
					break;
40
				case 'chargerBdtxa' :
41
				case 'chargerBdtxa' :
Line 128... Line 129...
128
				throw new Exception("Erreur d'insertion pour le tuple $id");
129
				throw new Exception("Erreur d'insertion pour le tuple $id");
129
			}
130
			}
130
		}
131
		}
131
	}
132
	}
Line -... Line 133...
-
 
133
	
-
 
134
	private function genererChpNomComplet() {
-
 
135
		$this->preparerTablePrChpNomComplet();
-
 
136
		$this->remplirChpNomComplet();
-
 
137
	}
-
 
138
	
-
 
139
	private function preparerTablePrChpNomComplet() {
-
 
140
		$requete = "SHOW COLUMNS FROM {$this->table} LIKE 'nom_complet' ";
-
 
141
		$resultat = $this->getBdd()->recuperer($requete);
-
 
142
		if ($resultat === false) {
-
 
143
			$requete = 	"ALTER TABLE {$this->table} ".
-
 
144
						'ADD nom_complet VARCHAR( 500 ) '.
-
 
145
						'CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ';
-
 
146
			$this->getBdd()->requeter($requete);
-
 
147
		}
-
 
148
	}
-
 
149
	
-
 
150
	private function remplirChpNomComplet() {
-
 
151
		$this->afficherAvancement("Attribution du champ nom complet au taxons");
-
 
152
		$requete = "UPDATE {$this->table} SET nom_complet = CONCAT(nom_sci,' ',auteur)";
-
 
153
		$resultat = $this->getBdd()->requeter($requete);
-
 
154
		if ($resultat === false) {
-
 
155
			throw new Exception("Erreur de génération du champ nom complet");
-
 
156
		}
-
 
157
	}
132
 
158
 
133
	private function genererChpFamille() {
159
	private function genererChpFamille() {
134
		$this->initialiserGenerationChamps();
160
		$this->initialiserGenerationChamps();
135
		$this->preparerTablePrChpFamille();
161
		$this->preparerTablePrChpFamille();
136
		$resultats = $this->recupererTuplesPrChpFamille();
162
		$resultats = $this->recupererTuplesPrChpFamille();