Subversion Repositories eFlore/Applications.del

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1870 jpm 1
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
2
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
3
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
4
 
5
-- -----------------------------------------------------
6
-- View `del_obs_images`
7
-- -----------------------------------------------------
8
DROP VIEW IF EXISTS `del_obs_images` ;
9
DROP TABLE IF EXISTS `del_obs_images`;
10
 
11
 
12
-- -----------------------------------------------------
13
-- View `del_observations`
14
-- -----------------------------------------------------
15
DROP VIEW IF EXISTS `del_observation` ;
16
DROP TABLE IF EXISTS `del_observation`;
17
CREATE  OR REPLACE VIEW del_observation AS
18
    SELECT id_observation,
19
        if((char_length(o.ce_utilisateur) <> 32),cast(o.ce_utilisateur as unsigned),0) AS ce_utilisateur,
20
        o.prenom_utilisateur, o.nom_utilisateur, o.courriel_utilisateur,
21
        nom_sel, nom_sel_nn, nom_ret, nom_ret_nn, nt, famille,
22
        ce_zone_geo, zone_geo, lieudit, station, milieu, nom_referentiel,
23
        date_observation, o.mots_cles_texte, o.commentaire,
24
        o.date_creation, o.date_modification, o.date_transmission, certitude
25
    FROM tb_cel.cel_obs AS o INNER JOIN tb_cel.cel_images AS i ON (o.id_observation = i.ce_observation)
26
    WHERE o.transmission = '1' ;
27
 
28
-- -----------------------------------------------------
29
-- View `del_images`
30
-- -----------------------------------------------------
31
DROP VIEW IF EXISTS `del_image` ;
32
DROP TABLE IF EXISTS `del_image`;
33
CREATE  OR REPLACE VIEW del_image AS
34
    SELECT i.id_image, i.ce_observation,
35
        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,
36
        i.hauteur, i.largeur, i.date_prise_de_vue, i.mots_cles_texte, i.commentaire, i.nom_original,
37
        i.date_creation, i.date_modification, i.date_liaison, i.date_transmission
38
    FROM tb_cel.cel_images AS i
39
    WHERE i.transmission = '1';
40
 
41
-- -----------------------------------------------------
42
-- View `v_del_image`
43
-- -----------------------------------------------------
44
DROP VIEW IF EXISTS `v_del_image` ;
45
DROP TABLE IF EXISTS `v_del_image`;
46
 
47
-- -----------------------------------------------------
48
SET SQL_MODE=@OLD_SQL_MODE;
49
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
50
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;