Subversion Repositories Applications.papyrus

Rev

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

Rev 2124 Rev 2125
Line 185... Line 185...
185
		if(!$ids) return array();
185
		if(!$ids) return array();
186
		// DB access is dumb, let's use this one and pray
186
		// DB access is dumb, let's use this one and pray
187
		$db = $GLOBALS['_MOTEUR_RECHERCHE_']['bd']['papyrus'];
187
		$db = $GLOBALS['_MOTEUR_RECHERCHE_']['bd']['papyrus'];
188
		$req = $db->query(sprintf(<<<EOF
188
		$req = $db->query(sprintf(<<<EOF
189
SELECT b.num_nom AS id, CONCAT(nom_sci, ' (nn: ', b.num_nom, ', nt: ', num_taxonomique, ')') AS titre, GROUP_CONCAT(n.nom_vernaculaire) AS description
189
SELECT b.num_nom AS id, CONCAT(nom_sci, ' (nn: ', b.num_nom, ', nt: ', num_taxonomique, ')') AS titre, GROUP_CONCAT(n.nom_vernaculaire) AS description
190
FROM tb_eflore.bdtfx_v1_02 b
190
FROM tb_eflore.bdtfx_v1_01 b
191
LEFT JOIN tb_eflore.nvjfl_v2007 n ON n.num_taxon = b.num_taxonomique
191
LEFT JOIN tb_eflore.nvjfl_v2007 n ON n.num_taxon = b.num_taxonomique
192
WHERE b.num_nom IN (%s)
192
WHERE b.num_nom IN (%s)
193
GROUP BY n.num_taxon
193
GROUP BY n.num_taxon
194
EOF
194
EOF
195
								  ,
195
								  ,