Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 522 Rev 891
Line 48... Line 48...
48
	
48
	
49
	private function insererDonneesIndex() {
49
	private function insererDonneesIndex() {
50
		$table = Config::get('tables.index');
50
		$table = Config::get('tables.index');
51
		$requete_truncate = 'TRUNCATE TABLE '.$table;
51
		$requete_truncate = 'TRUNCATE TABLE '.$table;
-
 
52
		$this->Bdd->requeter($requete_truncate);
52
		$this->Bdd->requeter($requete_truncate);
53
		$i = 0;
53
		foreach ($this->valeurs_insertion as $tab => $res){
54
		foreach ($this->valeurs_insertion as $tab => $res){
54
			if ($tab == 'baseflor') {
55
			if ($tab == 'baseflor') {
55
				foreach ($res as  $valeurs ) {
56
				foreach ($res as  $valeurs ) {
56
					$requete = "INSERT INTO $table VALUES('',{$valeurs['cle']},null,'".strtolower($valeurs['BDNT']).".nn:{$valeurs['num_nomen']}')";
57
					$requete = "INSERT INTO $table VALUES({$i},{$valeurs['cle']},null,'".strtolower($valeurs['BDNT']).".nn:{$valeurs['num_nomen']}')";
-
 
58
					$this->Bdd->requeter($requete);
57
					$this->Bdd->requeter($requete);
59
					$i++;
58
					$this->message->afficherAvancement('Insertion des valeurs issues de baseflor en cours');
60
					$this->message->afficherAvancement('Insertion des valeurs issues de baseflor en cours');
59
				}
61
				}
60
			} else {
62
			} else {
61
				foreach ($res as  $valeurs ) {
63
				foreach ($res as  $valeurs ) {
62
					$requete = "INSERT INTO $table VALUES('',null,{$valeurs['cle']},'{$valeurs['bdnt']}.nn{$valeurs['num_nomen']}')";
64
					$requete = "INSERT INTO $table VALUES({$i},null,{$valeurs['cle']},'{$valeurs['bdnt']}.nn{$valeurs['num_nomen']}')";
-
 
65
					$this->Bdd->requeter($requete);
63
					$this->Bdd->requeter($requete);
66
					$i++;
64
					$this->message->afficherAvancement('Insertion des valeurs issues des rangs supérieurs en cours');
67
					$this->message->afficherAvancement('Insertion des valeurs issues des rangs supérieurs en cours');
65
				}
68
				}
66
			}
69
			}
67
		}
70
		}