1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
CREATE TABLE IF NOT EXISTS `joueurs` (
`id_joueur` int(10) NOT NULL AUTO_INCREMENT,
`appariement` int(10) DEFAULT NULL,
`pseudo` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id_joueur`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
INSERT INTO `joueurs` (`appariement`, `pseudo`) VALUES
(1, '1'),
(2, '5'),
(3, '8'),
(4, '2'),
(5, '4'),
(1, '9'),
(2, '3'),
(3, '7'),
(4, '10'),
(5, '6');
CREATE TABLE IF NOT EXISTS `rencontres` (
`id_rencontre` int(10) NOT NULL AUTO_INCREMENT,
`ronde` int(10) DEFAULT NULL,
`id_tournois` int(10) DEFAULT NULL,
`id_joueur_noir` int(10) DEFAULT NULL,
`id_joueur_blanc` int(10) DEFAULT NULL,
`points_noir` varchar(10) DEFAULT NULL,
`points_blanc` varchar(10) DEFAULT NULL,
`table` int(11) DEFAULT NULL,
PRIMARY KEY (`id_rencontre`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
INSERT INTO `rencontres`
(`ronde`, `id_tournois`, `id_joueur_noir`, `id_joueur_blanc`, `points_noir`, `points_blanc`, `table`)
VALUES
(1, 1, 1, 6, '1', '0', 1),
(1, 1, 2, 7, '0', '1', 2),
(1, 1, 3, 8, '0.5', '0.5', 3),
(1, 1, 4, 9, '0', '0', 4),
(1, 1, 5, 10, '1', '0', 5); |
Partager