Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 326 → Rev 327

/trunk/services/modules/0.1/bdtfx/Taxons.php
100,7 → 100,7
if (strrpos($this->ressources[0], 'nt:') !== false) {
if ($this->presence_num_tax) {
// SELECT num_nom FROM bdtfx_v2_00 WHERE num_nom = num_nom_retenu AND num_taxonomique = X;
$this->requete_condition[0] = 'num_nom = num_nom_retenu AND num_taxonomique = '
$this->requete_condition[0] = ' num_taxonomique = '
.str_replace('nt:', '', $this->ressources[0]).' ';
} else {
$e = 'Erreur dans votre requête : </br> Le numéro taxonomique n\'existe pas dans ce projet';
108,8 → 108,7
}
} else {
// SELECT num_nom FROM bdtfx_v2_00 WHERE num_nom = (SELECT num_nom_retenu FROM bdtfx_v2_00 WHERE num_nom = X);
$this->requete_condition[0] = 'num_nom = (SELECT num_nom_retenu FROM '
.$this->table.' WHERE num_nom = '.$this->ressources[0].')';
$this->requete_condition[0] = 'num_nom = '.$this->ressources[0];
}
}
120,11 → 119,11
$identifiant = '';
if ($this->entete_http == '') {
//on récupere l'identifiant du taxon correspondant au num_nom ou num_taxonomique demandé pour pouvoir l'afficher
$req_tax = 'SELECT num_nom FROM '.$this->table.' WHERE '.$this->requete_condition[0];
$req_tax = 'SELECT num_nom_retenu FROM '.$this->table.' WHERE '.$this->requete_condition[0];
$res_tax = $this->getBdd()->recuperer($req_tax);
//on recherche ensuite les identifiants des taxons supérieurs ou inférieurs
if ($res_tax && $res_tax != '') {
$identifiant = $res_tax['num_nom'];
$identifiant = $res_tax['num_nom_retenu'];
} else {
$e = 'Le numéro de taxon ou l\'identifiant de nom correspondant au num_nom '
.$this->ressources[0].' n\'existe pas dans la base.';
195,10 → 194,8
public function recupererIdSup() {
//SELECT num_nom FROM bfdtx_v2_00 WHERE num_nom = (SELECT num_tax_sup FROM bdtfx_v2_00 WHERE num_nom = X);
$req_relation = 'SELECT num_nom FROM '.$this->table
.' WHERE num_nom = (SELECT num_tax_sup FROM '
.$this->table
.' WHERE '.implode(' AND ', $this->requete_condition).')';
$req_relation = 'SELECT num_tax_sup as num_nom FROM '.$this->table
.' WHERE '.implode(' AND ', $this->requete_condition);
$res_relation = $this->getBdd()->recupererTous($req_relation);
return $res_relation;
}