Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 739 → Rev 740

/trunk/services/modules/0.1/bdtfx/Taxons.php
120,7 → 120,7
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_retenu FROM '.$this->table.' WHERE '.$this->requete_condition[0];
$res_tax = $this->getBdd()->recuperer($req_tax);
$res_tax = $this->getBdd()->recuperer($req_tax . ' -- ' . __FILE__ . ':' . __LINE__ );
//on recherche ensuite les identifiants des taxons supérieurs ou inférieurs
if ($res_tax && $res_tax != '') {
$identifiant = $res_tax['num_nom_retenu'];
215,7 → 215,7
'WHERE num_nom = '.$this->getBdd()->proteger($this->num_nom_taxon).')'.
', '.$this->getBdd()->proteger($this->num_nom_taxon.'-%').
')';
$res_relation = $this->getBdd()->recupererTous($req_relation);
$res_relation = $this->getBdd()->recupererTous($req_relation . ' -- ' . __FILE__ . ':' . __LINE__ );
return $res_relation;
}
225,7 → 225,7
.' WHERE num_tax_sup = (SELECT num_nom FROM '
.$this->table
.' WHERE '.implode(' AND ', $this->requete_condition).')';
$res_relation = $this->getBdd()->recupererTous($req_relation);
$res_relation = $this->getBdd()->recupererTous($req_relation . ' -- ' . __FILE__ . ':' . __LINE__ );
return $res_relation;
}
234,7 → 234,7
//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_tax_sup as num_nom FROM '.$this->table
.' WHERE '.implode(' AND ', $this->requete_condition);
$res_relation = $this->getBdd()->recupererTous($req_relation);
$res_relation = $this->getBdd()->recupererTous($req_relation . ' -- ' . __FILE__ . ':' . __LINE__ );
return $res_relation;
}
 
263,7 → 263,7
//-----------------------------FONCTIONS DASSEMBLAGE DE LA REQUETE-----------------------------------------------------
public function assemblerLaRequete() {
public function assemblerLaRequete() {
if ($this->format_reponse != 'taxons/stats/initiales') {
$this->mettreAuFormat(); //on remplace les nom_sci par les nom_sci_html
}
271,7 → 271,8
' FROM '.$this->table
.$this->retournerRequeteCondition()
.$this->requete_group_by
.$this->formerRequeteLimite();
.$this->formerRequeteLimite() .
' -- ' . __FILE__ . ':' . __LINE__ ;
return $requete;
}
458,8 → 459,8
public function recupererIdSuperieur($id, $version) {
$req = 'SELECT num_nom, num_nom_retenu, num_tax_sup, rang, nom_sci FROM '
.$version.' WHERE num_nom = '.$this->getBdd()->proteger($id);
$res = $this->getBdd()->recupererTous($req);
.$version.' WHERE num_nom = '.$this->getBdd()->proteger($id);
$res = $this->getBdd()->recupererTous($req . ' -- ' . __FILE__ . ':' . __LINE__ );
if ($res) {
$resultat = $res[0];
} else {
509,7 → 510,7
$req = 'SELECT num_tax_sup, count(*) as nb FROM '.$this->table
.' WHERE num_tax_sup IN ('.implode(',',$tab_num)
.') AND num_nom = num_nom_retenu GROUP BY num_tax_sup';
$res = $this->getBdd()->recupererTous($req);
$res = $this->getBdd()->recupererTous($req . ' -- ' . __FILE__ . ':' . __LINE__ );
if ($res) {
$resultat = $res;
} else {