Line 6... |
Line 6... |
6 |
-- View `del_obs_images`
|
6 |
-- View `del_obs_images`
|
7 |
-- -----------------------------------------------------
|
7 |
-- -----------------------------------------------------
|
8 |
DROP VIEW IF EXISTS `del_obs_images` ;
|
8 |
DROP VIEW IF EXISTS `del_obs_images` ;
|
9 |
DROP TABLE IF EXISTS `del_obs_images`;
|
9 |
DROP TABLE IF EXISTS `del_obs_images`;
|
Line -... |
Line 10... |
- |
|
10 |
|
- |
|
11 |
-- View `v_del_image`
|
- |
|
12 |
-- -----------------------------------------------------
|
- |
|
13 |
DROP VIEW IF EXISTS `v_del_image` ;
|
Line 10... |
Line 14... |
10 |
|
14 |
DROP TABLE IF EXISTS `v_del_image`;
|
11 |
|
15 |
|
12 |
-- -----------------------------------------------------
|
16 |
-- -----------------------------------------------------
|
13 |
-- View `del_observations`
|
17 |
-- View `del_observations`
|
Line 37... |
Line 41... |
37 |
i.date_creation, i.date_modification, i.date_liaison, i.date_transmission
|
41 |
i.date_creation, i.date_modification, i.date_liaison, i.date_transmission
|
38 |
FROM tb_cel.cel_images AS i
|
42 |
FROM tb_cel.cel_images AS i
|
39 |
WHERE i.transmission = '1';
|
43 |
WHERE i.transmission = '1';
|
Line 40... |
Line 44... |
40 |
|
44 |
|
41 |
-- -----------------------------------------------------
|
45 |
-- -----------------------------------------------------
|
42 |
-- View `v_del_image`
|
46 |
-- View `del_plantnet`
|
- |
|
47 |
-- -----------------------------------------------------
|
43 |
-- -----------------------------------------------------
|
48 |
## Il est nécessaire de garder une vue de ce type car l'optimisateur d'index de MYSQL fait n'importe quoi dans le cas du WS plantnet/changements...
|
44 |
DROP VIEW IF EXISTS `v_del_image` ;
|
49 |
DROP VIEW IF EXISTS `del_plantnet` ;
|
- |
|
50 |
DROP TABLE IF EXISTS `del_plantnet`;
|
- |
|
51 |
CREATE OR REPLACE VIEW del_plantnet AS
|
- |
|
52 |
SELECT o.*,
|
- |
|
53 |
i.id_image,
|
- |
|
54 |
i.ce_utilisateur AS i_ce_utilisateur, i.prenom_utilisateur AS i_prenom_utilisateur, i.nom_utilisateur AS i_nom_utilisateur, i.courriel_utilisateur AS i_courriel_utilisateur,
|
- |
|
55 |
hauteur, largeur, i.date_prise_de_vue, i.mots_cles_texte AS i_mots_cles_texte, i.commentaire AS i_commentaire, i.nom_original,
|
- |
|
56 |
i.date_creation AS i_date_creation, i.date_modification AS i_date_modification, i.date_liaison AS i_date_liaison, i.date_transmission AS i_date_transmission
|
- |
|
57 |
FROM tb_cel.cel_obs AS o
|
- |
|
58 |
INNER JOIN tb_cel.cel_images AS i ON (o.id_observation = i.ce_observation )
|
Line 45... |
Line 59... |
45 |
DROP TABLE IF EXISTS `v_del_image`;
|
59 |
WHERE o.transmission = '1';
|
46 |
|
60 |
|
47 |
-- -----------------------------------------------------
|
61 |
-- -----------------------------------------------------
|
48 |
SET SQL_MODE=@OLD_SQL_MODE;
|
62 |
SET SQL_MODE=@OLD_SQL_MODE;
|
49 |
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
63 |
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|