Rev 714 | Rev 734 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
-- TODO : Voir comment remplacer le test REGEXP par quelque chose de plus simple.
DROP VIEW IF EXISTS del_utilisateur ;
DROP TABLE IF EXISTS del_utilisateur;
CREATE VIEW del_utilisateur AS
SELECT id_utilisateur, prenom, nom, courriel, mot_de_passe, licence_acceptee
FROM tb_cel.cel_utilisateurs;
DROP VIEW IF EXISTS del_observation ;
DROP TABLE IF EXISTS del_observation;
CREATE VIEW del_observation AS
SELECT id_observation, ce_utilisateur, nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, famille,
ce_zone_geo, zone_geo, lieudit, station, milieu,
date_observation, mots_cles_texte, commentaire,
date_creation, date_modification, date_transmission
FROM tb_cel.cel_obs
WHERE transmission = '1'
AND ce_utilisateur REGEXP '^[[:digit:]]+$';
DROP VIEW IF EXISTS del_obs_images ;
DROP TABLE IF EXISTS del_obs_images;
CREATE VIEW del_obs_images AS
SELECT oi.id_image, oi.id_utilisateur, oi.id_observation, oi.date_liaison
FROM tb_cel.cel_obs_images AS oi
INNER JOIN tb_cel.cel_obs AS o ON (oi.id_observation = o.id_observation)
WHERE o.transmission = '1'
AND oi.id_utilisateur REGEXP '^[[:digit:]]+$';
DROP VIEW IF EXISTS del_image ;
DROP TABLE IF EXISTS del_image;
CREATE VIEW del_image AS
SELECT i.id_image, i.ce_utilisateur, i.hauteur, i.largeur, i.date_prise_de_vue, i.mots_cles_texte,
i.commentaire, i.nom_original, i.date_modification, i.date_creation, i.publiable_eflore
FROM tb_cel.cel_images AS i ON (i.id_image = oi.id_image)
INNER JOIN tb_cel.cel_obs_images AS oi ON (oi.id_observation = o.id_observation)
INNER JOIN tb_cel.cel_obs AS o
WHERE o.transmission = '1'
AND i.id_utilisateur REGEXP '^[[:digit:]]+$';