|
@@ -0,0 +1,172 @@
|
|
1
|
+-- phpMyAdmin SQL Dump
|
|
2
|
+-- version 4.2.12deb2
|
|
3
|
+-- http://www.phpmyadmin.net
|
|
4
|
+--
|
|
5
|
+-- Client : localhost
|
|
6
|
+-- Généré le : Sam 23 Mai 2015 à 15:16
|
|
7
|
+-- Version du serveur : 5.5.43-0+deb8u1
|
|
8
|
+-- Version de PHP : 5.6.7-1
|
|
9
|
+
|
|
10
|
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
|
11
|
+SET time_zone = "+00:00";
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
|
15
|
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
|
16
|
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
|
17
|
+/*!40101 SET NAMES utf8 */;
|
|
18
|
+
|
|
19
|
+--
|
|
20
|
+-- Base de données : `burgerquizz`
|
|
21
|
+--
|
|
22
|
+
|
|
23
|
+-- --------------------------------------------------------
|
|
24
|
+
|
|
25
|
+--
|
|
26
|
+-- Structure de la table `categorie`
|
|
27
|
+--
|
|
28
|
+
|
|
29
|
+CREATE TABLE IF NOT EXISTS `categorie` (
|
|
30
|
+ `nom_cat` varchar(30) NOT NULL
|
|
31
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
32
|
+
|
|
33
|
+--
|
|
34
|
+-- Contenu de la table `categorie`
|
|
35
|
+--
|
|
36
|
+
|
|
37
|
+INSERT INTO `categorie` (`nom_cat`) VALUES
|
|
38
|
+('Dessin Animés'),
|
|
39
|
+('ISEN'),
|
|
40
|
+('Jeux Vidéos');
|
|
41
|
+
|
|
42
|
+-- --------------------------------------------------------
|
|
43
|
+
|
|
44
|
+--
|
|
45
|
+-- Structure de la table `questions`
|
|
46
|
+--
|
|
47
|
+
|
|
48
|
+CREATE TABLE IF NOT EXISTS `questions` (
|
|
49
|
+ `intitule` varchar(150) NOT NULL,
|
|
50
|
+ `num_reponse` tinyint(4) NOT NULL,
|
|
51
|
+ `reponse1` varchar(50) NOT NULL DEFAULT '',
|
|
52
|
+ `reponse2` varchar(50) NOT NULL DEFAULT ''
|
|
53
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
54
|
+
|
|
55
|
+--
|
|
56
|
+-- Contenu de la table `questions`
|
|
57
|
+--
|
|
58
|
+
|
|
59
|
+INSERT INTO `questions` (`intitule`, `num_reponse`, `reponse1`, `reponse2`) VALUES
|
|
60
|
+('2 d''entre eux ont tapé ce texte:', 2, 'Les CSI', 'Les CIR'),
|
|
61
|
+('A été diffusée pendant les années 80:', 0, 'Les Mystérieuses Cités d''Or', 'Les Tortues Ninjas'),
|
|
62
|
+('C''est un héros de Nintendo:', 0, 'Mario', 'Link'),
|
|
63
|
+('Elle est accompagnée d’animaux:', 1, 'Gigi', 'Magical DoReMi'),
|
|
64
|
+('Elle possède une fée nommée Dodo:', 2, 'Gigi', 'Magical DoReMi'),
|
|
65
|
+('Il à révé sur l'' île de Cocolint:', 2, 'Mario', 'Link'),
|
|
66
|
+('Il protège le royaume champignon:', 1, 'Mario', 'Link'),
|
|
67
|
+('Ils passent en colle:', 1, 'Les CSI', 'Les CIR'),
|
|
68
|
+('Les clubs y sont situés:', 1, 'Rez de chaussée', '1er étage'),
|
|
69
|
+('L’héroïne possède des pouvoirs magique:', 0, 'Gigi', 'Magical DoReMi'),
|
|
70
|
+('On y affronte une tortue à trois tête:', 1, 'A Link to the Past', 'Ocarina of Time'),
|
|
71
|
+('On y aperçoit un bateau nommé Solaris:', 1, 'Les Mystérieuses Cités d''Or', 'Les Tortues Ninjas'),
|
|
72
|
+('On y combat des Skulltulas:', 2, 'A Link to the Past', 'Ocarina of Time'),
|
|
73
|
+('On y ramasse des fragment de cœur:', 0, 'A Link to the Past', 'Ocarina of Time'),
|
|
74
|
+('On y trouve des salles de cours:', 0, 'Rez de chaussée', '1er étage'),
|
|
75
|
+('Ont des cours de Maths/Physique:', 0, 'Les CSI', 'Les CIR'),
|
|
76
|
+('Un certain Shreder y intervient:', 2, 'Les Mystérieuses Cités d''Or', 'Les Tortues Ninjas'),
|
|
77
|
+('Une salle consacrée aux devoir s''y situe:', 2, 'Rez de chaussée', '1er étage');
|
|
78
|
+
|
|
79
|
+-- --------------------------------------------------------
|
|
80
|
+
|
|
81
|
+--
|
|
82
|
+-- Structure de la table `reponses`
|
|
83
|
+--
|
|
84
|
+
|
|
85
|
+CREATE TABLE IF NOT EXISTS `reponses` (
|
|
86
|
+ `reponse1` varchar(50) NOT NULL,
|
|
87
|
+ `reponse2` varchar(50) NOT NULL,
|
|
88
|
+ `nom_cat` varchar(30) NOT NULL
|
|
89
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
90
|
+
|
|
91
|
+--
|
|
92
|
+-- Contenu de la table `reponses`
|
|
93
|
+--
|
|
94
|
+
|
|
95
|
+INSERT INTO `reponses` (`reponse1`, `reponse2`, `nom_cat`) VALUES
|
|
96
|
+('Gigi', 'Magical DoReMi', 'Dessin Animés'),
|
|
97
|
+('Les Mystérieuses Cités d''Or', 'Les Tortues Ninjas', 'Dessin Animés'),
|
|
98
|
+('Les CSI', 'Les CIR', 'ISEN'),
|
|
99
|
+('Rez de chaussée', '1er étage', 'ISEN'),
|
|
100
|
+('A Link to the Past', 'Ocarina of Time', 'Jeux Vidéos'),
|
|
101
|
+('Mario', 'Link', 'Jeux Vidéos');
|
|
102
|
+
|
|
103
|
+-- --------------------------------------------------------
|
|
104
|
+
|
|
105
|
+--
|
|
106
|
+-- Structure de la table `scores`
|
|
107
|
+--
|
|
108
|
+
|
|
109
|
+CREATE TABLE IF NOT EXISTS `scores` (
|
|
110
|
+ `login` varchar(20) NOT NULL,
|
|
111
|
+ `score` int(11) NOT NULL
|
|
112
|
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
113
|
+
|
|
114
|
+--
|
|
115
|
+-- Contenu de la table `scores`
|
|
116
|
+--
|
|
117
|
+
|
|
118
|
+INSERT INTO `scores` (`login`, `score`) VALUES
|
|
119
|
+('Jean', 85),
|
|
120
|
+('kikou37', 14),
|
|
121
|
+('Micheline', 85),
|
|
122
|
+('Patrick', 24),
|
|
123
|
+('thefifou', 56);
|
|
124
|
+
|
|
125
|
+--
|
|
126
|
+-- Index pour les tables exportées
|
|
127
|
+--
|
|
128
|
+
|
|
129
|
+--
|
|
130
|
+-- Index pour la table `categorie`
|
|
131
|
+--
|
|
132
|
+ALTER TABLE `categorie`
|
|
133
|
+ ADD PRIMARY KEY (`nom_cat`);
|
|
134
|
+
|
|
135
|
+--
|
|
136
|
+-- Index pour la table `questions`
|
|
137
|
+--
|
|
138
|
+ALTER TABLE `questions`
|
|
139
|
+ ADD PRIMARY KEY (`intitule`,`reponse1`,`reponse2`), ADD KEY `FK_Questions_reponse2` (`reponse2`), ADD KEY `FK_Questions_reponse1` (`reponse1`);
|
|
140
|
+
|
|
141
|
+--
|
|
142
|
+-- Index pour la table `reponses`
|
|
143
|
+--
|
|
144
|
+ALTER TABLE `reponses`
|
|
145
|
+ ADD PRIMARY KEY (`reponse1`,`reponse2`), ADD KEY `reponse2` (`reponse2`), ADD KEY `FK_Reponses_nom_cat` (`nom_cat`);
|
|
146
|
+
|
|
147
|
+--
|
|
148
|
+-- Index pour la table `scores`
|
|
149
|
+--
|
|
150
|
+ALTER TABLE `scores`
|
|
151
|
+ ADD PRIMARY KEY (`login`);
|
|
152
|
+
|
|
153
|
+--
|
|
154
|
+-- Contraintes pour les tables exportées
|
|
155
|
+--
|
|
156
|
+
|
|
157
|
+--
|
|
158
|
+-- Contraintes pour la table `questions`
|
|
159
|
+--
|
|
160
|
+ALTER TABLE `questions`
|
|
161
|
+ADD CONSTRAINT `FK_Questions_reponse1` FOREIGN KEY (`reponse1`) REFERENCES `reponses` (`reponse1`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
162
|
+ADD CONSTRAINT `FK_Questions_reponse2` FOREIGN KEY (`reponse2`) REFERENCES `reponses` (`reponse2`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
163
|
+
|
|
164
|
+--
|
|
165
|
+-- Contraintes pour la table `reponses`
|
|
166
|
+--
|
|
167
|
+ALTER TABLE `reponses`
|
|
168
|
+ADD CONSTRAINT `FK_Reponses_nom_cat` FOREIGN KEY (`nom_cat`) REFERENCES `categorie` (`nom_cat`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
169
|
+
|
|
170
|
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
171
|
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
172
|
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|