PiRSquared17 / eude

Automatically exported from code.google.com/p/eude
0 stars 0 forks source link

Notation des planètes inhabitées #293

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
= Description de la fonctionnalité demandé =

Notation des planètes, voila pour mon empire, j'ai mis en place un système de 
notation des planetes inhabitées, indiquant le nombre de ressources a 
beaucoup. Très pratique pour la colonisation.

J'ai utiliser un trigger.

Je fourni le code du trigger ci dessous, si ca peux servir d'autre...

DELIMITER ||
CREATE TRIGGER Pla_Insert AFTER INSERT ON coordonnee_planetes
FOR EACH ROW BEGIN
DECLARE changed INT DEFAULT 0;
    IF New.Titane='Beaucoup' then 
        SET changed = changed + 1;
    END IF;
    IF New.Cuivre='Beaucoup' then 
         SET changed = changed + 1;
        END IF;
    IF New.Fer='Beaucoup' then 
         SET changed = changed + 1;
        END IF;
    IF New.Aluminium='Beaucoup' then 
         SET changed = changed + 1;
        END IF;
    IF New.Mercure='Beaucoup' then 
         SET changed = changed + 1;
        END IF;
    IF New.Silicium='Beaucoup' then 
         SET changed = changed + 1;
        END IF;
    IF New.Uranium='Beaucoup' then 
        SET changed = changed + 1;
        END IF;
    IF New.Krypton='Beaucoup' then 
         SET changed = changed + 1;
        END IF;
    IF New.Azote='Beaucoup' then 
         SET changed = changed + 1;
        END IF;
    IF New.Hydrogene='Beaucoup' then 
         SET changed = changed + 1;
        END IF;
    UPDATE Coordonnee Set Note=changed Where Id=New.Pid;
END;

= Lien/Version de 'eude' =

= Système d'exploitation/navigateur =

= Caractéristiques hébergeur =

= Informations complémentaire =

Original issue reported on code.google.com by sirlew...@gmail.com on 24 Jul 2010 at 10:50

GoogleCodeExporter commented 9 years ago
Je vois pas trop ce que sa fait pour le coup ^^

Original comment by Alex10336@gmail.com on 24 Jul 2010 at 11:04

GoogleCodeExporter commented 9 years ago
Pas grand chose, ca note visiblement le nombre de beaucoup qu'à la planète 
dans note. Après bon question de méthode de recherche, mais personnellement 
je me base pas sur le nombre de beaucoup pour chercher une planète à colo.

Original comment by XCharism...@gmail.com on 24 Jul 2010 at 11:45

GoogleCodeExporter commented 9 years ago

Original comment by Alex10336@gmail.com on 24 Jul 2010 at 1:21