Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 1175 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1175 Rev 1299
Line 755... Line 755...
755
		} else {
755
		} else {
756
			$code = $this->transformerChampEnCode($champ);
756
			$code = $this->transformerChampEnCode($champ);
757
			if (preg_match('/^([^_-]+)(?:_|-)([^_-]+)$/', $code, $match)) {
757
			if (preg_match('/^([^_-]+)(?:_|-)([^_-]+)$/', $code, $match)) {
758
				$code = $match[1].ucfirst($match[2]);
758
				$code = $match[1].ucfirst($match[2]);
759
			}
759
			}
-
 
760
			$bdd = Config::get('bdd_table_ontologies');
-
 
761
			$requete = sprintf(
760
			$requete = sprintf('SELECT * FROM %s WHERE id IN (SELECT id FROM %s WHERE code = "%s" AND classe_id = (SELECT id FROM %s WHERE code = "%s")) LIMIT 0, 100 -- %s:%s', Config::get('bdd_table_ontologies'), Config::get('bdd_table_ontologies'), $valeur, Config::get('bdd_table_ontologies'), $code, __FILE__,  __LINE__);
762
			    'SELECT ba.* FROM %s ba JOIN %s bb ON (ba.id = bb.id AND bb.code = "%s") JOIN %s bc ON (bc.id= bb.classe_id AND bc.code = "%s")  LIMIT 0, 100 -- %s:%s',
-
 
763
			    $bdd, $bdd, $valeur, $bdd, $code, __FILE__, __LINE__
-
 
764
			);
761
			$res = $this->getBdd()->recuperer($requete);
765
			$res = $this->getBdd()->recuperer($requete);
762
			$nom_code = $valeur;
766
			$nom_code = $valeur;
763
			if (is_array($res)) {
767
			if (is_array($res)) {
764
				$nom_code = $res['nom'];
768
				$nom_code = $res['nom'];
765
			}
769
			}