Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 2046 Rev 2122
Line 95... Line 95...
95
class CelTaxonNomFrom {
95
class CelTaxonNomFrom {
96
  const db = 'tb_eflore';
96
  const db = 'tb_eflore';
97
  const bdtfx = 'bdtfx_v2_00';
97
  const bdtfx = 'bdtfx_v2_00';
98
  const bdtxa = 'bdtxa_v1_01';
98
  const bdtxa = 'bdtxa_v1_01';
99
  const isfan = 'isfan_v2013';
99
  const isfan = 'isfan_v2013';
-
 
100
  const bdtao = 'bdtao_v1_00';
Line 100... Line 101...
100
 
101
 
101
  // get from num_nom(_sel)
102
  // get from num_nom(_sel)
102
  static function NN($db, $id, $ref) {
103
  static function NN($db, $id, $ref) {
103
	if(!$db || !$id || !$ref) return FALSE;
104
	if(!$db || !$id || !$ref) return FALSE;
Line 128... Line 129...
128
	  return $db->query(sprintf("SELECT o.num_nom_retenu AS nom_ret_nn, o.num_taxonomique AS nt, CONCAT(o.nom_sci, ' ', o.auteur) AS nom_sel".
129
	  return $db->query(sprintf("SELECT o.num_nom_retenu AS nom_ret_nn, o.num_taxonomique AS nt, CONCAT(o.nom_sci, ' ', o.auteur) AS nom_sel".
129
								" , o.famille, CONCAT(ret.nom_sci, ' ', ret.auteur) AS nom_ret".
130
								" , o.famille, CONCAT(ret.nom_sci, ' ', ret.auteur) AS nom_ret".
130
								" FROM %s.%s o".
131
								" FROM %s.%s o".
131
								" LEFT JOIN %s.%s ret ON o.num_nom_retenu != 0 AND o.num_nom_retenu = ret.num_nom".
132
								" LEFT JOIN %s.%s ret ON o.num_nom_retenu != 0 AND o.num_nom_retenu = ret.num_nom".
132
								" WHERE o.num_nom = %d -- %s:%d", self::db, self::isfan,  self::db, self::isfan, intval($id), __FILE__, __LINE__))->fetch(PDO::FETCH_ASSOC);
133
								" WHERE o.num_nom = %d -- %s:%d", self::db, self::isfan,  self::db, self::isfan, intval($id), __FILE__, __LINE__))->fetch(PDO::FETCH_ASSOC);
-
 
134
	case "bdtao":
-
 
135
	  return $db->query(sprintf("SELECT o.num_nom_retenu AS nom_ret_nn, o.num_taxonomique AS nt, CONCAT(o.nom_sci, ' ', o.auteur) AS nom_sel".
-
 
136
								" , o.famille, CONCAT(ret.nom_sci, ' ', ret.auteur) AS nom_ret".
-
 
137
								" FROM %s.%s o".
-
 
138
								" LEFT JOIN %s.%s ret ON o.num_nom_retenu != 0 AND o.num_nom_retenu = ret.num_nom".
-
 
139
								" WHERE o.num_nom = %d -- %s:%d", self::db, self::bdtao,  self::db, self::bdtao, intval($id), __FILE__, __LINE__))->fetch(PDO::FETCH_ASSOC);
133
	}
140
	}
134
	return FALSE;
141
	return FALSE;
135
  }
142
  }
136
}
143
}