Subversion Repositories Applications.referentiel

Rev

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

Rev 308 Rev 317
Line 157... Line 157...
157
		$liste_nom = $this->getNomRetenu($param);
157
		$liste_nom = $this->getNomRetenu($param);
158
		if ($liste_nom != '') {
158
		if ($liste_nom != '') {
159
			// Construction de la requête
159
			// Construction de la requête
160
			// si recherche des synonymes
160
			// si recherche des synonymes
161
			$requete = (($this->distinct) ? 'SELECT DISTINCT' : 'SELECT').' num_nom, nom_sci, auteur, annee, '.
161
			$requete = (($this->distinct) ? 'SELECT DISTINCT' : 'SELECT').' num_nom, nom_sci, auteur, annee, '.
162
						'biblio_origine, nom_addendum, num_nom_retenu, '.
-
 
163
						(($referentiel == "bdtfx" || $referentiel == "bdtre") ? 'num_basionyme' : 
162
						'biblio_origine, nom_addendum, num_nom_retenu, '.(($referentiel == "bdtfx" || $referentiel == "bdtre") ? 'num_basionyme' : 
164
						'basionyme').', synonyme_mal_applique, presence, exclure_taxref '.
163
						'basionyme').', synonyme_mal_applique, presence, exclure_taxref '.
165
							' FROM '.$referentiel.' WHERE num_nom_retenu IN ('.$liste_nom.') '.
164
							' FROM '.$referentiel.' WHERE num_nom_retenu IN ('.$liste_nom.') '.
166
							'ORDER BY nom_sci ASC '; 
165
							'ORDER BY nom_sci ASC '; 
167
			try {
166
			try {
168
				$donnees = $this->bdd->query($requete)->fetchAll(PDO::FETCH_ASSOC);
167
				$donnees = $this->bdd->query($requete)->fetchAll(PDO::FETCH_ASSOC);
Line 471... Line 470...
471
			'nr' => 'bool',
470
			'nr' => 'bool',
472
			'tax' => 'bool',
471
			'tax' => 'bool',
473
			'pre' => 'bool',
472
			'pre' => 'bool',
474
			'taxref' => 'bool',
473
			'taxref' => 'bool',
475
			'classif' => '',
474
			'classif' => '',
476
			'nad' => 'str',
-
 
477
			'rg' => 'int');
475
			'rg' => 'int');
Line 478... Line 476...
478
		
476
		
479
		$p = $this->traiterParametresUrl(array_keys($params_passes), $param, false);
477
		$p = $this->traiterParametresUrl(array_keys($params_passes), $param, false);
480
		//$this->debug[] = $param;
478
		//$this->debug[] = $param;
Line 585... Line 583...
585
				" OR nom_francais LIKE {$p['mots']} ".
583
				" OR nom_francais LIKE {$p['mots']} ".
586
				" OR presence LIKE {$p['mots']} ".
584
				" OR presence LIKE {$p['mots']} ".
587
				" OR statut_origine LIKE {$p['mots']} ".
585
				" OR statut_origine LIKE {$p['mots']} ".
588
				" OR statut_introduction LIKE {$p['mots']} ".
586
				" OR statut_introduction LIKE {$p['mots']} ".
589
				" OR statut_culture LIKE {$p['mots']} ";
587
				" OR statut_culture LIKE {$p['mots']} ";
590
			$where .= ($referentiel == "bdtfx" || $referentiel == "bdtre") ? " OR num_basionyme LIKE {$p['mots']}) " : " OR basionyme  LIKE {$p['mots']}) ";
588
			$where .= ($referentiel == "bdtfx") ? " OR num_basionyme LIKE {$p['mots']}) " : " OR basionyme  LIKE {$p['mots']}) ";
591
			}
589
			}
592
		}
590
		}
593
		if (isset($p['sg'])) {
591
		if (isset($p['sg'])) {
594
			$where .= "AND nom_supra_generique LIKE {$p['sg']} ";
592
			$where .= "AND nom_supra_generique LIKE {$p['sg']} ";
595
		}
593
		}