Subversion Repositories Applications.referentiel

Rev

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

Rev 306 Rev 308
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, '.
162
						'biblio_origine, nom_addendum, num_nom_retenu, '.(($referentiel == "bdtfx") ? 'num_basionyme' : 
163
						(($referentiel == "bdtfx" || $referentiel == "bdtre") ? 'num_basionyme' : 
163
						'basionyme').', synonyme_mal_applique, presence, exclure_taxref '.
164
						'basionyme').', synonyme_mal_applique, presence, exclure_taxref '.
164
							' FROM '.$referentiel.' WHERE num_nom_retenu IN ('.$liste_nom.') '.
165
							' FROM '.$referentiel.' WHERE num_nom_retenu IN ('.$liste_nom.') '.
165
							'ORDER BY nom_sci ASC '; 
166
							'ORDER BY nom_sci ASC '; 
166
			try {
167
			try {
167
				$donnees = $this->bdd->query($requete)->fetchAll(PDO::FETCH_ASSOC);
168
				$donnees = $this->bdd->query($requete)->fetchAll(PDO::FETCH_ASSOC);
Line 470... Line 471...
470
			'nr' => 'bool',
471
			'nr' => 'bool',
471
			'tax' => 'bool',
472
			'tax' => 'bool',
472
			'pre' => 'bool',
473
			'pre' => 'bool',
473
			'taxref' => 'bool',
474
			'taxref' => 'bool',
474
			'classif' => '',
475
			'classif' => '',
-
 
476
			'nad' => 'str',
475
			'rg' => 'int');
477
			'rg' => 'int');
Line 476... Line 478...
476
		
478
		
477
		$p = $this->traiterParametresUrl(array_keys($params_passes), $param, false);
479
		$p = $this->traiterParametresUrl(array_keys($params_passes), $param, false);
478
		//$this->debug[] = $param;
480
		//$this->debug[] = $param;
Line 583... Line 585...
583
				" OR nom_francais LIKE {$p['mots']} ".
585
				" OR nom_francais LIKE {$p['mots']} ".
584
				" OR presence LIKE {$p['mots']} ".
586
				" OR presence LIKE {$p['mots']} ".
585
				" OR statut_origine LIKE {$p['mots']} ".
587
				" OR statut_origine LIKE {$p['mots']} ".
586
				" OR statut_introduction LIKE {$p['mots']} ".
588
				" OR statut_introduction LIKE {$p['mots']} ".
587
				" OR statut_culture LIKE {$p['mots']} ";
589
				" OR statut_culture LIKE {$p['mots']} ";
588
			$where .= ($referentiel == "bdtfx") ? " OR num_basionyme LIKE {$p['mots']}) " : " OR basionyme  LIKE {$p['mots']}) ";
590
			$where .= ($referentiel == "bdtfx" || $referentiel == "bdtre") ? " OR num_basionyme LIKE {$p['mots']}) " : " OR basionyme  LIKE {$p['mots']}) ";
589
			}
591
			}
590
		}
592
		}
591
		if (isset($p['sg'])) {
593
		if (isset($p['sg'])) {
592
			$where .= "AND nom_supra_generique LIKE {$p['sg']} ";
594
			$where .= "AND nom_supra_generique LIKE {$p['sg']} ";
593
		}
595
		}