Subversion Repositories eFlore/Applications.del

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1614 jpm 1
# Commparaison des vues del_images et v_del_images
2
ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_del_image` AS
3
select
4
	`o`.`id_observation` AS `id_observation`,
5
	`o`.`ordre` AS `ordre`,
6
	`o`.`ce_utilisateur` AS `ce_utilisateur`,
7
	`o`.`prenom_utilisateur` AS `prenom_utilisateur`,
8
	`o`.`nom_utilisateur` AS `nom_utilisateur`,
9
	`o`.`courriel_utilisateur` AS `courriel_utilisateur`,
10
	`o`.`nom_sel` AS `nom_sel`,
11
	`o`.`nom_sel_nn` AS `nom_sel_nn`,
12
	`o`.`nom_ret` AS `nom_ret`,
13
	`o`.`nom_ret_nn` AS `nom_ret_nn`,
14
	`o`.`nt` AS `nt`,
15
	`o`.`famille` AS `famille`,
16
	`o`.`nom_referentiel` AS `nom_referentiel`,
17
	`o`.`ce_zone_geo` AS `ce_zone_geo`,
18
	`o`.`zone_geo` AS `zone_geo`,
19
	`o`.`lieudit` AS `lieudit`,
20
	`o`.`station` AS `station`,
21
	`o`.`milieu` AS `milieu`,
22
	`o`.`latitude` AS `latitude`,
23
	`o`.`longitude` AS `longitude`,
24
	`o`.`altitude` AS `altitude`,
25
	`o`.`geodatum` AS `geodatum`,
26
	`o`.`date_observation` AS `date_observation`,
27
	`o`.`mots_cles_texte` AS `mots_cles_texte`,
28
	`o`.`commentaire` AS `commentaire`,
29
	`o`.`transmission` AS `transmission`,
30
	`o`.`date_creation` AS `date_creation`,
31
	`o`.`date_modification` AS `date_modification`,
32
	`o`.`date_transmission` AS `date_transmission`,
33
	`o`.`abondance` AS `abondance`,
34
	`o`.`certitude` AS `certitude`,
35
	`o`.`phenologie` AS `phenologie`,
36
	`o`.`code_insee_calcule` AS `code_insee_calcule`,
37
	`i`.`id_image` AS `id_image`,
38
	`i`.`ordre` AS `i_ordre`,
39
	`i`.`ce_utilisateur` AS `i_ce_utilisateur`,
40
	`i`.`prenom_utilisateur` AS `i_prenom_utilisateur`,
41
	`i`.`nom_utilisateur` AS `i_nom_utilisateur`,
42
	`i`.`courriel_utilisateur` AS `i_courriel_utilisateur`,
43
	`i`.`hauteur` AS `hauteur`,
44
	`i`.`largeur` AS `largeur`,
45
	`i`.`date_prise_de_vue` AS `date_prise_de_vue`,
46
	`i`.`mots_cles_texte` AS `i_mots_cles_texte`,
47
	`i`.`commentaire` AS `i_commentaire`,
48
	`i`.`nom_original` AS `nom_original`,
49
	`i`.`publiable_eflore` AS `publiable_eflore`
50
from
51
		`tb_cel`.`cel_obs` `o`
52
		JOIN `tb_cel`.`cel_obs_images` `oi` ON `oi`.`id_observation` = `o`.`id_observation`
53
		JOIN `tb_cel`.`cel_images` `i` ON `i`.`id_image` = `oi`.`id_image`
54
WHERE `o`.`transmission` = '1';
55
 
56
ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `del_image` AS
57
select
58
	`i`.`id_image` AS `id_image`,
59
	if((char_length(`i`.`ce_utilisateur`) <> 32), cast(`i`.`ce_utilisateur` AS unsigned), 0) AS `ce_utilisateur`,
60
	`i`.`prenom_utilisateur` AS `prenom_utilisateur`,
61
	`i`.`nom_utilisateur` AS `nom_utilisateur`,
62
	`i`.`courriel_utilisateur` AS `courriel_utilisateur`,
63
	`i`.`hauteur` AS `hauteur`,
64
	`i`.`largeur` AS `largeur`,
65
	`i`.`date_prise_de_vue` AS `date_prise_de_vue`,
66
	`i`.`mots_cles_texte` AS `mots_cles_texte`,
67
	`i`.`commentaire` AS `commentaire`,
68
	`i`.`nom_original` AS `nom_original`,
69
	`i`.`date_modification` AS `date_modification`,
70
	`i`.`date_creation` AS `date_creation`,
71
	`i`.`publiable_eflore` AS `publiable_eflore`,
72
	`o`.`nom_referentiel` AS `nom_referentiel`
73
from
74
	`tb_cel`.`cel_images` `i`
75
	JOIN `tb_cel`.`cel_obs_images` `oi` ON `i`.`id_image` = `oi`.`id_image`
76
	JOIN `tb_cel`.`cel_obs` `o` ON `oi`.`id_observation` = `o`.`id_observation`
77
where `o`.`transmission` = '1'