Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 739 → Rev 740

/trunk/services/modules/0.1/bdtfx/CommunNomsTaxons.php
568,6 → 568,7
 
public function afficherDonnees($champApi, $valeur) {
$champBdd = $this->trouverChampBddCorrespondant($champApi);
 
if ($this->parametres['retour.format'] == 'min') {
if ($champApi == 'nom_sci') {
$valeur = $valeur.' '.$this->ajouterCompositionNom($this->resultat_req);
758,7 → 759,7
if ($this->parametres['ns.format'] == 'htm') {
$req = str_replace('nom_sci', 'nom_sci_html as nom_sci', $req);
}
$res = $this->getBdd()->recuperer($req);
$res = $this->getBdd()->recuperer($req . ' -- ' . __FILE__ . ':' . __LINE__);
if ($res) {
$nom['nom_sci'] = $res['nom_sci'];
$nom['nom_sci_html'] = $res['nom_sci_html'];
/trunk/services/modules/0.1/bdtfx/Noms.php
276,7 → 276,8
$this->retournerRequeteCondition().' '.
$this->requete_group_by.' '.
$this->retournerOrderBy().' '.
$this->formerRequeteLimite();
$this->formerRequeteLimite() .
' -- ' . __FILE__ . ':' . __LINE__ ;
return $requete;
}
 
372,6 → 373,7
//-------------------FONCTIONS POUR LE FORMATAGE EN JSON----------------------------------------------------------------
 
public function retournerResultatFormate($resultat) {
 
switch ($this->format_reponse) {
case 'noms/relations' :
$reponse = $this->formaterRelations($resultat[0]);
535,7 → 537,7
'SELECT num_nom_retenu FROM '.$this->table.' WHERE num_nom = "'.$num_nom.'"'.
')';
 
return $this->getBdd()->recupererTous($requete);
return $this->getBdd()->recupererTous($requete . ' -- ' . __FILE__ . ':' . __LINE__ );
}
 
public function formaterIdFlores($resultat) {
/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 {