Subversion Repositories Applications.referentiel

Rev

Rev 326 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 326 Rev 330
Line 79... Line 79...
79
	
79
	
80
		// Initialisation des variables
80
		// Initialisation des variables
81
		$info = array();
81
		$info = array();
82
		$champs = array("titre", "code", "version", "domaine_taxo", "domaine_geo", "domaine_nom", "classification", "coordinateur", "auteur", "contributeur", "date_production", "source", "contact", "editeur", "droit", "licence", "referencement");
82
		$champs = array("titre", "code", "version", "domaine_taxo", "domaine_geo", "domaine_nom", "classification", "coordinateur", "auteur", "contributeur", "date_production", "source", "contact", "editeur", "droit", "licence", "referencement");
83
		$p = $this->traiterParametresUrl(array("ref","version"), $param, false);
83
		$p = $this->traiterParametresUrl(array("ref","version"), $param, false);
84
		$racine_tmp = Config::get('chemin_tmp');
84
		$racine_tmp = $this->config['chemins']['chemin_tmp'];
85
		$fichier = $racine_tmp.date('Y_m_d')."/meta_".$p['version']."_".time().'.csv';
85
		$fichier = $racine_tmp.date('Y_m_d')."/meta_".$p['version']."_".time().'.csv';
86
		$requete = "SELECT '".implode("', '", $champs)."' UNION ( SELECT ".implode(", ", $champs).
86
		$requete = "SELECT '".implode("', '", $champs)."' UNION ( SELECT ".implode(", ", $champs).
87
				" INTO OUTFILE '".
87
				" INTO OUTFILE '".
88
			$fichier."' CHARACTER SET utf8 FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n' ". 
88
			$fichier."' CHARACTER SET utf8 FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n' ".