Line 31... |
Line 31... |
31 |
-- -----------------------------------------------------
|
31 |
-- -----------------------------------------------------
|
32 |
-- View `del_utilisateurs`
|
32 |
-- View `del_utilisateurs`
|
33 |
-- -----------------------------------------------------
|
33 |
-- -----------------------------------------------------
|
34 |
DROP VIEW IF EXISTS `del_utilisateurs` ;
|
34 |
DROP VIEW IF EXISTS `del_utilisateurs` ;
|
35 |
DROP TABLE IF EXISTS `del_utilisateurs`;
|
35 |
DROP TABLE IF EXISTS `del_utilisateurs`;
|
36 |
CREATE OR REPLACE VIEW del_utilisateur AS
|
36 |
CREATE OR REPLACE VIEW del_utilisateur AS
|
37 |
SELECT
|
37 |
SELECT
|
38 |
U_ID AS id_utilisateur,
|
38 |
U_ID AS id_utilisateur,
|
39 |
CONVERT(U_SURNAME USING UTF8) AS prenom,
|
39 |
CONVERT(U_SURNAME USING UTF8) AS prenom,
|
40 |
CONVERT(U_NAME USING UTF8) AS nom,
|
40 |
CONVERT(U_NAME USING UTF8) AS nom,
|
41 |
CONVERT(U_MAIL USING UTF8) AS courriel,
|
41 |
CONVERT(U_MAIL USING UTF8) AS courriel,
|
42 |
CONVERT(U_PASSWD USING UTF8) AS mot_de_passe
|
42 |
CONVERT(U_PASSWD USING UTF8) AS mot_de_passe
|
43 |
FROM tela_prod_v4.annuaire_tela;
|
43 |
FROM tela_prod_v4.annuaire_tela;
|
Line 44... |
Line 44... |
44 |
|
44 |
|
45 |
-- -----------------------------------------------------
|
45 |
-- -----------------------------------------------------
|
46 |
-- View `del_observations`
|
46 |
-- View `del_observations`
|
47 |
-- -----------------------------------------------------
|
47 |
-- -----------------------------------------------------
|
48 |
DROP VIEW IF EXISTS `del_observations` ;
|
48 |
DROP VIEW IF EXISTS `del_observations` ;
|
49 |
DROP TABLE IF EXISTS `del_observations`;
|
49 |
DROP TABLE IF EXISTS `del_observations`;
|
50 |
CREATE OR REPLACE VIEW del_observation AS
|
50 |
CREATE OR REPLACE VIEW del_observation AS
|
51 |
SELECT id_observation, if((char_length(o.ce_utilisateur) <> 32),cast(o.ce_utilisateur as unsigned),0) AS ce_utilisateur, prenom_utilisateur, nom_utilisateur, courriel_utilisateur, nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, famille,
|
51 |
SELECT id_observation, if((char_length(o.ce_utilisateur) <> 32),cast(o.ce_utilisateur as unsigned),0) AS ce_utilisateur, prenom_utilisateur, nom_utilisateur, courriel_utilisateur, nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, famille,
|
52 |
ce_zone_geo, zone_geo, lieudit, station, milieu, nom_referentiel,
|
52 |
ce_zone_geo, zone_geo, lieudit, station, milieu, nom_referentiel,
|
53 |
date_observation, mots_cles_texte, commentaire,
|
53 |
date_observation, mots_cles_texte, commentaire,
|
54 |
date_creation, date_modification, date_transmission
|
54 |
date_creation, date_modification, date_transmission, certitude
|
55 |
FROM tb_cel.cel_obs AS o
|
55 |
FROM tb_cel.cel_obs AS o
|
Line 56... |
Line 56... |
56 |
WHERE transmission = '1' ;
|
56 |
WHERE transmission = '1' ;
|
57 |
|
57 |
|
58 |
-- -----------------------------------------------------
|
58 |
-- -----------------------------------------------------
|
59 |
-- View `del_images`
|
59 |
-- View `del_images`
|
60 |
-- -----------------------------------------------------
|
60 |
-- -----------------------------------------------------
|
61 |
DROP VIEW IF EXISTS `del_images` ;
|
61 |
DROP VIEW IF EXISTS `del_images` ;
|
62 |
DROP TABLE IF EXISTS `del_images`;
|
62 |
DROP TABLE IF EXISTS `del_images`;
|
63 |
CREATE OR REPLACE VIEW del_image AS
|
63 |
CREATE OR REPLACE VIEW del_image AS
|
64 |
SELECT i.id_image, if((char_length(i.ce_utilisateur) <> 32),cast(i.ce_utilisateur as unsigned),0) AS ce_utilisateur, i.prenom_utilisateur, i.nom_utilisateur, i.courriel_utilisateur, i.hauteur, i.largeur, i.date_prise_de_vue, i.mots_cles_texte,
|
64 |
SELECT i.id_image, if((char_length(i.ce_utilisateur) <> 32),cast(i.ce_utilisateur as unsigned),0) AS ce_utilisateur, i.prenom_utilisateur, i.nom_utilisateur, i.courriel_utilisateur, i.hauteur, i.largeur, i.date_prise_de_vue, i.mots_cles_texte,
|
65 |
i.commentaire, i.nom_original, i.date_modification, i.date_creation, i.publiable_eflore, o.nom_referentiel
|
65 |
i.commentaire, i.nom_original, i.date_modification, i.date_creation, i.publiable_eflore, o.nom_referentiel
|
66 |
FROM tb_cel.cel_images AS i
|
66 |
FROM tb_cel.cel_images AS i
|
67 |
INNER JOIN tb_cel.cel_obs_images AS oi ON (i.id_image = oi.id_image)
|
67 |
INNER JOIN tb_cel.cel_obs_images AS oi ON (i.id_image = oi.id_image)
|
Line 68... |
Line 68... |
68 |
INNER JOIN tb_cel.cel_obs AS o ON (oi.id_observation = o.id_observation)
|
68 |
INNER JOIN tb_cel.cel_obs AS o ON (oi.id_observation = o.id_observation)
|
69 |
WHERE o.transmission = '1' ;
|
69 |
WHERE o.transmission = '1' ;
|
70 |
|
70 |
|
71 |
-- -----------------------------------------------------
|
71 |
-- -----------------------------------------------------
|
72 |
-- View `del_obs_images`
|
72 |
-- View `del_obs_images`
|
73 |
-- -----------------------------------------------------
|
73 |
-- -----------------------------------------------------
|
74 |
DROP VIEW IF EXISTS `del_obs_images` ;
|
74 |
DROP VIEW IF EXISTS `del_obs_images` ;
|
75 |
DROP TABLE IF EXISTS `del_obs_images`;
|
75 |
DROP TABLE IF EXISTS `del_obs_images`;
|
76 |
CREATE OR REPLACE VIEW del_obs_image AS
|
76 |
CREATE OR REPLACE VIEW del_obs_image AS
|
77 |
SELECT oi.id_image, oi.id_observation, oi.date_liaison
|
77 |
SELECT oi.id_image, oi.id_observation, oi.date_liaison
|
Line 78... |
Line 78... |
78 |
FROM tb_cel.cel_obs_images AS oi
|
78 |
FROM tb_cel.cel_obs_images AS oi
|
79 |
INNER JOIN tb_cel.cel_obs AS o ON (oi.id_observation = o.id_observation)
|
79 |
INNER JOIN tb_cel.cel_obs AS o ON (oi.id_observation = o.id_observation)
|
80 |
WHERE o.transmission = '1' ;
|
80 |
WHERE o.transmission = '1' ;
|