le paté
This commit is contained in:
@@ -284,7 +284,7 @@ WHERE
|
||||
|
||||
SET @row_number = 0;
|
||||
|
||||
INSERT INTO `comprend`(`idpartie`, `num_tour`, `idlancer`) SELECT `id_partie`, `numTour`, @row_number:=@row_number+1 AS idlancers
|
||||
INSERT INTO `comprend`(`idpartie`, `num_tour`, `idlancer`, `numero_lancer_dans_tour`) SELECT `id_partie`, `numTour`, @row_number:=@row_number+1 AS idlancers_de_de, numL
|
||||
FROM donnees_fournies.instances3 t;
|
||||
|
||||
SET @row_number = 0;
|
||||
@@ -292,14 +292,14 @@ INSERT INTO `effectue`(`idjoueur`, `idlancer`)
|
||||
SELECT inst3.id_joueur, @row_number:=@row_number+1 AS idlancer
|
||||
FROM donnees_fournies.instances3 inst3;
|
||||
|
||||
SET @idlancer = 0;
|
||||
INSERT INTO `de_lance`(`idlancer`, `rang_couleur_valeur`)
|
||||
SELECT @idlancer:=@idlancer+1 AS idlancer, CONCAT('1;', de1) AS rang_couleur_valeur FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @idlancer:=@idlancer+1, CONCAT('2;', de2) FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @idlancer:=@idlancer+1, CONCAT('3;', de3) FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @idlancer:=@idlancer+1, CONCAT('4;', de4) FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @idlancer:=@idlancer+1, CONCAT('5;', de5) FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @idlancer:=@idlancer+1, CONCAT('6;', de6) FROM `donnees_fournies`.`instances3`;
|
||||
SET @roulement = 0;
|
||||
INSERT INTO `de_lance`(`roulement_de_de`, `rang_couleur_valeur`, `idlancer`)
|
||||
SELECT @roulement:=@roulement+1 AS roulement, CONCAT('1;', de1) AS rang_couleur_valeur, (FLOOR((@roulement-1)/6) + 1) AS idlancer FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @roulement:=@roulement+1, CONCAT('2;', de2), (FLOOR((@roulement-1)/6) + 1) AS idlancer FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @roulement:=@roulement+1, CONCAT('3;', de3), (FLOOR((@roulement-1)/6) + 1) AS idlancer FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @roulement:=@roulement+1, CONCAT('4;', de4), (FLOOR((@roulement-1)/6) + 1) AS idlancer FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @roulement:=@roulement+1, CONCAT('5;', de5), (FLOOR((@roulement-1)/6) + 1) AS idlancer FROM `donnees_fournies`.`instances3`
|
||||
UNION ALL SELECT @roulement:=@roulement+1, CONCAT('6;', de6), (FLOOR((@roulement-1)/6) + 1) AS idlancer FROM `donnees_fournies`.`instances3`;
|
||||
|
||||
INSERT INTO `joue`(`idjoueur`, `idpartie`, `couleur_pion`, `rang`)
|
||||
SELECT `id_joueur`, `id_partie`, NULL, `rang_arrivee` FROM donnees_fournies.instances1;
|
||||
|
||||
Reference in New Issue
Block a user