Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 771 | Rev 1124 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 771 Rev 773
Line 125... Line 125...
125
	private function chargerDonneesVersion($versionDonnees, $version) {
125
	private function chargerDonneesVersion($versionDonnees, $version) {
126
		$fichierTsvTpl = Config::get('chemins.chorodepTpl');
126
		$fichierTsvTpl = Config::get('chemins.chorodepTpl');
127
		$fichierTsv = sprintf($fichierTsvTpl, $versionDonnees, $versionDonnees);
127
		$fichierTsv = sprintf($fichierTsvTpl, $versionDonnees, $versionDonnees);
128
		$tableTpl = Config::get('tables.chorodepTpl');
128
		$tableTpl = Config::get('tables.chorodepTpl');
129
		$table = sprintf($tableTpl, $version);
129
		$table = sprintf($tableTpl, $version);
130
		$champs = Config::get('chorodepChamps');
130
		$champs = Config::get('chorodepChamps'.$version);
131
		$requete = "LOAD DATA INFILE '$fichierTsv' ".
131
		$requete = "LOAD DATA INFILE '$fichierTsv' ".
132
						"REPLACE INTO TABLE $table ".
132
						"REPLACE INTO TABLE $table ".
133
						'CHARACTER SET utf8 '.
133
						'CHARACTER SET utf8 '.
134
						'FIELDS '.
134
						'FIELDS '.
135
						"	TERMINATED BY '\t' ".
135
						"	TERMINATED BY '\t' ".
136
						"	ENCLOSED BY '' ".
136
						"	ENCLOSED BY '' ".
137
						"	ESCAPED BY '\\\' ".
137
						"	ESCAPED BY '\\\' ".
138
						'IGNORE 1 LINES '.
-
 
139
						"($champs) ";
138
						"($champs) ";
140
		$this->getBdd()->requeter($requete);
139
		$this->getBdd()->requeter($requete);
141
	}
140
	}
Line 142... Line 141...
142
 
141