bonjour,
j'ai une liste des eleves d'une ecole et les coeficients different selon les classes le probleme est que j'ai des soucis pour recuperer les coeficients pour les classes de terminal qui font les lv1 et lv2

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<?php
$host = 'localhost';  
$user = 'root'; 
$pass = ''; 
$bdd  = 'notes'; 
@mysql_connect($host,$user,$pass)
   or die("Impossible de se connecter");
@mysql_select_db("$bdd")
   or die("Impossible de se connecter");
 
	$classe=$_GET['classe'];
	$serie=$_GET['serie'];
 
	$req=mysql_query("SELECT * FROM eleve,note,matiere,coeficient WHERE
	               ClasseEl='$classe' AND serieEl='$serie' AND idelevenote=ideleve AND matierenote=matierec AND serieEl=seriec AND matierenote=matiere 
				    DISTINCT BY matierenote ")
		          or die ('Error '.mysql_error());	
 
 
 
 
	$sql3=mysql_query("SELECT * FROM eleve, classe, serie WHERE classeEl='$classe' and serieEl=serie");
 
	$entete=mysql_fetch_array($sql3);
 
	$cl=mysql_query("SELECT * FROM classe ");
	$se=mysql_query("SELECT * FROM serie ");
 
?>
<!DOCTYPE htm>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 
<title>Bulletin</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="mp.css" rel="stylesheet" type="text/css" media="print"/>
</head>
<body>
<table>
<tr>
<td>
 
<form name="classe" method="GET" action="bulletinclasse.php" >
 
		<label>Selectionner une classe:
	<select name="classe" id="classe">
		<?php while($listeclasse=mysql_fetch_array($cl)){ ?>
			<option value="<?php echo $listeclasse['classe']; ?>" >
		<?php echo $listeclasse['classe']; ?>
			</option>
		<?php } ?>
	</select>
		</label>
		<label>Serie:
	<select name="serie" id="serie">
		<?php while($listeserie=mysql_fetch_array($se)){ ?>
			<option value="<?php echo $listeserie['serie']; ?>" >
		<?php echo $listeserie['serie']; ?>
			</option>
		<?php } ?>
	</select>
		</label>
		<label>
			<input type="submit" name="bouton" id="bouton" value="Acceder" />
		</label>
</form>
 
<?php 
//while($entete=mysql_fetch_array($sql3)){
?>
</table>
<div id="page">
<table align="center" width=870px border= 1px solid black >
<tr>
 
<td colspan=3>
Ministere de l'education <br/>
<?php 
echo $scool_name.'<br/>'; 
echo $scool_adresse.' - '.$scool_ville.'<br/>' ;
echo "Autorisation : ".$scool_ninea.'<br/>' ;
echo "Tel : ".$scool_tel.'<br/>' ;
echo "Courriel : ".$scool_mail.'<br/>' ;
?>
 
 </td>
 <td >
 <br/>
<?php 
echo 'Année scolaire: '.$scool_name.'<br/>'; 
echo datedetailfr() ;
 
 
?>
 
 </td>
 
		</tr>
<tr>
			<td>Nom:&nbsp;&nbsp;<?php echo $entete['nomEl']; ?> </td>
 
			<td >Prenom: <?php echo $entete['prenomEl']; ?> </td>
			<td>Classe:  <?php echo $entete['classe']; ?> </td>
 
			<td>Serie:  <?php echo $entete['serieEl']; ?> </td>
		</tr>
</table>
<?php 
//}
?>
<br /><br /><br />
<div class="pos">
 
<table align="center" border="1px solid black" >
	<caption>Bulletin de note</caption>
 
 
			<th>Mat.</th><th>Matiere</th><th>note1</th><th>note2</th><th>note3</th>
			<th>compo1</th><th>Semetre1</th><th>idmatiere</th><th>serie</th><th>coef</th><th>notecoef</th><th>Observation</th>
 
 
<?php
  $somcoef=0;
		$somnotecoef=0;
 while ($eleve=mysql_fetch_array($req)){ 
 
 
 
		if(empty($eleve['compo1']))
		{
		 $trim1=($eleve['note1'] + $eleve['note2'] + $eleve['note3']) / 3;
		}
		 if(empty($eleve['note1']))
		{
		 $trim1=($eleve['note2'] + $eleve['note3'] + $eleve['compo1']) / 3;
		}
		 if(empty($eleve['note2']))
		{
		 $trim1=($eleve['note1'] + $eleve['note3'] + $eleve['compo1']) / 3;
		}
		 if(empty($eleve['note3']))
		{
		 $trim1=($eleve['note1'] + $eleve['note2'] + $eleve['compo1']) / 3;
		}
		 if(empty($eleve['note1']) AND empty($eleve['compo1']))
		{
		 $trim1=($eleve['note2'] + $eleve['note3']) / 2;
		}
		if(empty($eleve['note1']) AND empty($eleve['note3']))
		{
		 $trim1=($eleve['note2'] + $eleve['compo1']) / 2;
		}
		 if(empty($eleve['note1']) AND empty($eleve['note2']))
		{
		 $trim1=($eleve['note3'] + $eleve['compo1']) / 2;
		}
		if(empty($eleve['note1']) AND empty($eleve['note2']) AND empty($eleve['note3']))
		{
		 $trim1=$eleve['compo1'] ;
		}
		if(empty($eleve['note2']) AND empty($eleve['note3']) AND empty($eleve['compo1']))
		{
		 $trim1=$eleve['note1'];
		}
		if(empty($eleve['note1']) AND empty($eleve['note3']) AND empty($eleve['compo1']))
		{
		 $trim1=$eleve['note2'];
		}
		if(empty($eleve['note1']) AND empty($eleve['note2']) AND empty($eleve['compo1']))
		{
		 $trim1=$eleve['note3'];
		}
		else
		{
		 $trim1=($eleve['note1'] + $eleve['note2'] + $eleve['note3'] + $eleve['compo1']) / 4;
		}
 
 
 
		$notecoef=$trim1*$eleve['coef'];
		$somcoef+=$eleve['coef'];
		$somnotecoef+=$trim1*$eleve['coef'];
		$moy=$somnotecoef/$somcoef;
                $sql4=mysql_query("SELECT SUM(note1) FROM note");
	$nbr=mysql_num_rows($req);
 
if($trim1<=7){
 $obs='Passable';}
elseif($trim1<=10){
$obs='Abien';}
elseif($trim1<=15){
$obs='Bien';}
elseif($trim1<=20){
$obs='Tres bien';
}  		
		//ADDITION D'UNE LIGNE
		/* $reqs  = mysql_query("SELECT SUM(note1) FROM note WHERE idelevenote='$id'");
		$sommenote1= mysql_fetch_array($reqs); 



	$addnotecoef=
		$moyenne  
		A faire*/
 
?>
 
 
		<tr colspan="7">
 
				<td><?php echo $eleve['idelevenote']; ?></td>
				<td><?php echo $eleve['matiere']; ?></td>
				<td><?php echo $eleve['note1']; ?></td>				
				<td><?php echo $eleve['note2']; ?></td>
				<td><?php echo $eleve['note3']; ?></td>
				<td><?php echo $eleve['compo1']; ?></td>
				<td><?php echo $trim1 ; ?></td> 
 
				<td><?php echo $eleve['matierec']; ?></td>
				<td><?php echo $eleve['serieEl']; ?></td>
				<td><?php echo $eleve['coef']; ?></td>
				<td><?php echo $notecoef; ?></td> 
				<td><?php echo $obs; ?></td> 
			<?php } ?>
 
		</tr>
		<tr>
				<td colspan="2">Total points</td>	
				<td><?php echo $somnotecoef; ?></td>	
				<td colspan="2">Moyenne</td>	
				<td><?php echo Round($moy,2); // permet de limiter a 2 chiffre apres la virgule ?></td> 
		</tr>
 
		<?php echo $somnotecoef; ?>
			<?php echo $somcoef; ?> 
 
 
 
 </table>
 </div>
 </div>
</body>
</html>
voici base de donnees
Code sql : Sélectionner tout - Visualiser dans une fenêtre à part
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- <a href="http://www.phpmyadmin.net" target="_blank">http://www.phpmyadmin.net</a>
--
-- Client: 127.0.0.1
-- Généré le: Jeu 25 Septembre 2014 à 04:04
-- Version du serveur: 5.5.27-log
-- Version de PHP: 5.4.6
 
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
 
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
 
--
-- Base de données: `notes`
--
CREATE DATABASE `notes` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `notes`;
 
-- --------------------------------------------------------
 
--
-- Structure de la table `admin`
--
 
CREATE TABLE `admin` (
  `pread` varchar(2) NOT NULL DEFAULT 'AD',
  `idad` int(11) NOT NULL AUTO_INCREMENT,
  `nomad` varchar(25) NOT NULL,
  `prenomad` varchar(60) NOT NULL,
  `telad` varchar(12) NOT NULL,
  `tel2ad` varchar(12) NOT NULL,
  `mailad` varchar(60) NOT NULL,
  `passead` varchar(255) NOT NULL,
  `photoad` varchar(25) NOT NULL DEFAULT 'avatarad.jpg',
  PRIMARY KEY (`idad`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
 
--
-- Contenu de la table `admin`
--
 
INSERT INTO `admin` (`pread`, `idad`, `nomad`, `prenomad`, `telad`, `tel2ad`, `mailad`, `passead`, `photoad`) VALUES
('AD', 1, 'TALL', 'Mouhamed', '778555456', '', 'tallamoust@gmail.com', '89e495e7941cf9e40e6980d14a16bf023ccd4c91', 'avatarad.jpg'),
('AD', 2, 'FALL', 'Ahmed', '657678789', '', '', 'db61277694fea41b42a8ac82cbb678baac683990', 'avatarad.jpg');
 
-- --------------------------------------------------------
 
--
-- Structure de la table `classe`
--
 
CREATE TABLE `classe` (
  `classe` varchar(20) NOT NULL,
  PRIMARY KEY (`classe`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
--
-- Contenu de la table `classe`
--
 
INSERT INTO `classe` (`classe`) VALUES
(''),
('1iere'),
('2nde'),
('3ieme'),
('4ieme'),
('5iem'),
('6iem'),
('Tle');
 
-- --------------------------------------------------------
 
--
-- Structure de la table `coeficient`
--
 
CREATE TABLE `coeficient` (
  `idcoef` int(11) NOT NULL AUTO_INCREMENT,
  `matierec` varchar(25) NOT NULL,
  `seriec` varchar(5) NOT NULL,
  `coef` int(11) NOT NULL,
  PRIMARY KEY (`idcoef`),
  KEY `matierec` (`matierec`,`seriec`),
  KEY `seriec` (`seriec`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
 
--
-- Contenu de la table `coeficient`
--
 
INSERT INTO `coeficient` (`idcoef`, `matierec`, `seriec`, `coef`) VALUES
(1, 'Anglais', 'L1', 3),
(2, 'Anglais', 'L2', 4),
(3, 'Anglais', 'S1', 1),
(4, 'Anglais', 'S2', 2),
(5, 'Français', 'L1', 5),
(6, 'Français', 'L2', 3),
(7, 'Français', 'S1', 2),
(8, 'Français', 'S2', 1),
(9, 'Mathematique', 'L1', 2),
(10, 'Mathematique', 'L2', 3),
(11, 'Mathematique', 'S1', 5),
(12, 'Mathematique', 'S2', 3),
(13, 'Philo', 'L1', 4),
(14, 'Philo', 'L2', 5),
(15, 'Philo', 'S1', 1),
(16, 'Philo', 'S2', 1);
 
-- --------------------------------------------------------
 
--
-- Structure de la table `eleve`
--
 
CREATE TABLE `eleve` (
  `pre` varchar(2) NOT NULL DEFAULT 'EL',
  `ideleve` int(11) NOT NULL AUTO_INCREMENT,
  `nomEl` varchar(25) NOT NULL,
  `prenomEl` varchar(50) NOT NULL,
  `ClasseEl` varchar(20) NOT NULL,
  `serieEl` varchar(5) NOT NULL,
  `lv1El` varchar(25) NOT NULL,
  `lv2El` varchar(25) NOT NULL,
  `cr` varchar(20) NOT NULL,
  `session` varchar(9) NOT NULL,
  PRIMARY KEY (`ideleve`),
  KEY `ClasseEl` (`ClasseEl`,`serieEl`,`lv1El`,`lv2El`,`cr`,`session`),
  KEY `session` (`session`),
  KEY `cr` (`cr`),
  KEY `lv2El` (`lv2El`),
  KEY `lv1El` (`lv1El`),
  KEY `serieEl` (`serieEl`),
  KEY `ClasseEl_2` (`ClasseEl`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
 
--
-- Contenu de la table `eleve`
--
 
INSERT INTO `eleve` (`pre`, `ideleve`, `nomEl`, `prenomEl`, `ClasseEl`, `serieEl`, `lv1El`, `lv2El`, `cr`, `session`) VALUES
('EL', 4, 'SALL', 'Mouhamed Amdy', '3ieme', 'L1', '', '', '', '2013/2014'),
('EL', 5, 'TALL', 'Fatoubintou', '3ieme', 'L1', '', '', '', '2013/2014'),
('EL', 6, 'DIAME', 'Alamine', '3ieme', 'L1', '', '', '', '2013/2014'),
('EL', 7, 'NDIAYE', 'Babacar', '3ieme', 'L1', '', '', '4ieme', '2012/2013'),
('EL', 8, 'DIAWARA', 'Maimouna', '4ieme', 'L2', '', '', '', '2013/2014'),
('EL', 9, 'SAGNA', 'Landing', '4ieme', 'L2', '', '', '', '2013/2014'),
('EL', 10, 'TALL', 'Elimane', '4ieme', 'S1', '', '', '6iem', '2013/2014'),
('EL', 11, 'CISSE', 'Daba', '4ieme', 'S1', '', '', '', '2013/2014'),
('EL', 12, 'BADJI', 'Mamadou', '5iem', '', '', '', '', '2013/2014'),
('EL', 13, 'LO', 'Rama', '5iem', '', '', '', '', '2013/2014'),
('EL', 14, 'KANE', 'Khady', '3ieme', 'S1', '', '', '', '2013/2014'),
('EL', 15, 'GAYE', 'Nana', '3ieme', 'S1', '', '', '', '2013/2014'),
('EL', 16, 'DIA', 'Aminta', '3ieme', 'S1', '', '', '', '2013/2014'),
('EL', 17, 'Aris', 'Mussa', 'Tle', 'L1', 'Anglais', '', '', '2013/2014'),
('EL', 18, 'DIATTA', 'Mamadou', 'Tle', 'L2', 'Anglais', '', '', '2013/2014'),
('EL', 19, 'NDIAYE', 'Fatou', 'Tle', 'S1', 'Anglais', '', '', '2013/2014'),
('EL', 20, 'Dieye', 'Maguette', 'Tle', 'S2', '', 'Anglais', '', '2013/2014');
 
-- --------------------------------------------------------
 
--
-- Structure de la table `lv1`
--
 
CREATE TABLE `lv1` (
  `classelv1` varchar(25) NOT NULL,
  `serielv1` varchar(5) NOT NULL,
  `matierelv1` varchar(25) NOT NULL,
  `coeflv1` int(11) NOT NULL,
  KEY `classelv1` (`classelv1`,`serielv1`,`matierelv1`,`coeflv1`),
  KEY `classelv1_2` (`classelv1`),
  KEY `serielv1` (`serielv1`),
  KEY `matierelv1` (`matierelv1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
--
-- Contenu de la table `lv1`
--
 
INSERT INTO `lv1` (`classelv1`, `serielv1`, `matierelv1`, `coeflv1`) VALUES
('Tle', 'L1', 'Anglais', 4),
('Tle', 'L1', 'Arabe', 3),
('Tle', 'L1', 'Espagnol', 2),
('Tle', 'L1', 'Russe', 3),
('Tle', 'L2', 'Anglais', 2),
('Tle', 'L2', 'Arabe', 3),
('Tle', 'L2', 'Espagnol', 3),
('Tle', 'L2', 'Russe', 3),
('Tle', 'S1', 'Anglais', 3),
('Tle', 'S1', 'Arabe', 4);
 
-- --------------------------------------------------------
 
--
-- Structure de la table `lv2`
--
 
CREATE TABLE `lv2` (
  `classelv2` varchar(20) NOT NULL,
  `serielv2` varchar(5) NOT NULL,
  `matierelv2` varchar(25) NOT NULL,
  `coeflv2` int(2) NOT NULL,
  KEY `classelv2` (`classelv2`),
  KEY `serielv2` (`serielv2`),
  KEY `matierelv2` (`matierelv2`),
  KEY `coeflv2` (`coeflv2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
--
-- Contenu de la table `lv2`
--
 
INSERT INTO `lv2` (`classelv2`, `serielv2`, `matierelv2`, `coeflv2`) VALUES
('Tle', 'L1', 'Anglais', 2),
('Tle', 'L1', 'Arabe', 3),
('Tle', 'L1', 'Espagnol', 2),
('Tle', 'L1', 'Russe', 1),
('Tle', 'L2', 'Anglais', 2),
('Tle', 'L2', 'Arabe', 2),
('Tle', 'L2', 'Espagnol', 2),
('Tle', 'L2', 'Russe', 2),
('Tle', 'S1', 'Anglais', 2),
('Tle', 'S1', 'Arabe', 1);
 
-- --------------------------------------------------------
 
--
-- Structure de la table `matiere`
--
 
CREATE TABLE `matiere` (
  `matiere` varchar(25) NOT NULL,
  PRIMARY KEY (`matiere`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
--
-- Contenu de la table `matiere`
--
 
INSERT INTO `matiere` (`matiere`) VALUES
(''),
('Anglais'),
('Français'),
('Mathematique'),
('Philo');
 
-- --------------------------------------------------------
 
--
-- Structure de la table `matierelv`
--
 
CREATE TABLE `matierelv` (
  `matierelv` varchar(25) NOT NULL,
  KEY `matierelv` (`matierelv`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
--
-- Contenu de la table `matierelv`
--
 
INSERT INTO `matierelv` (`matierelv`) VALUES
('Anglais'),
('Arabe'),
('Espagnol'),
('Russe');
 
-- --------------------------------------------------------
 
--
-- Structure de la table `note`
--
 
CREATE TABLE `note` (
  `idnote` int(11) NOT NULL AUTO_INCREMENT,
  `idelevenote` int(11) NOT NULL,
  `matierenote` varchar(25) NOT NULL,
  `note1` float DEFAULT NULL,
  `note2` float DEFAULT NULL,
  `note3` float DEFAULT NULL,
  `compo1` float DEFAULT NULL,
  PRIMARY KEY (`idnote`),
  KEY `idelevenote` (`idelevenote`,`matierenote`),
  KEY `idelevenote_2` (`idelevenote`),
  KEY `matierenote` (`matierenote`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=81 ;
 
--
-- Contenu de la table `note`
--
 
INSERT INTO `note` (`idnote`, `idelevenote`, `matierenote`, `note1`, `note2`, `note3`, `compo1`) VALUES
(1, 5, 'Anglais', 11, 13, 10, 12),
(2, 5, 'Français', 9, 11, 9, 9),
(3, 5, 'Mathematique', 12, 0, 12, 0),
(4, 5, 'Philo', 0, 15, 0, 18),
(5, 6, 'Anglais', 11, 12, 13, 12),
(6, 6, 'Français', 0, 0, 12, 12),
(7, 6, 'Mathematique', 12, 2, 12, 12),
(8, 6, 'Philo', 15, 14, 15, 14),
(9, 7, 'Anglais', 11, 0, 13, 14),
(10, 7, 'Français', 12, 14, 0, 14),
(11, 7, 'Mathematique', 0, 14, 12, 13),
(12, 7, 'Philo', 14, 0, 14, 12),
(13, 4, 'Anglais', 16, 15, 12, 11),
(14, 4, 'Français', 14, 0, 13, 0),
(15, 4, 'Mathematique', 7, 6, 0, 0),
(16, 4, 'Philo', 12, 10, NULL, 10),
(17, 8, 'Anglais', 15, NULL, 12, 12),
(18, 8, 'Français', 15, 15, NULL, 12),
(19, 8, 'Mathematique', 9, NULL, 10, 8),
(20, 8, 'Philo', 12, 12, NULL, 13),
(21, 9, 'Anglais', 12, NULL, 13, 12),
(22, 9, 'Français', NULL, 12, 12, 10),
(23, 9, 'Mathematique', 9, 9, NULL, 10),
(24, 9, 'Philo', 11, 14, 13, 14),
(25, 10, 'Anglais', 13, 13, NULL, 12),
(26, 10, 'Français', NULL, 15, 14, 13),
(27, 10, 'Mathematique', 11, 9, NULL, 9),
(28, 10, 'Philo', 15, 13, NULL, 14),
(34, 11, 'Anglais', 11, 12, 11, 12),
(64, 11, 'Mathematique', 11, 12, 12, 11),
(67, 11, 'Français', 11, 12, 12, 10),
(71, 17, 'Français', 11, 12, 11, 12),
(73, 18, 'Anglais', 12, 12, 11, 12),
(74, 18, 'Mathematique', 10, 10, 11, 12),
(75, 17, 'Anglais', 11, 10, NULL, 11),
(76, 17, 'Mathematique', 15, 13, NULL, 12),
(77, 18, 'Anglais', NULL, 12, 11, 12),
(78, 18, 'Français', 11, 12, NULL, 11),
(79, 19, 'Anglais', 11, NULL, NULL, 11),
(80, 20, 'Anglais', 15, 15, NULL, 13);
 
-- --------------------------------------------------------
 
--
-- Structure de la table `serie`
--
 
CREATE TABLE `serie` (
  `serie` varchar(5) NOT NULL,
  PRIMARY KEY (`serie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
--
-- Contenu de la table `serie`
--
 
INSERT INTO `serie` (`serie`) VALUES
(''),
('L1'),
('L2'),
('S1'),
('S2');
 
-- --------------------------------------------------------
 
--
-- Structure de la table `session`
--
 
CREATE TABLE `session` (
  `session` varchar(9) NOT NULL,
  PRIMARY KEY (`session`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
--
-- Contenu de la table `session`
--
 
INSERT INTO `session` (`session`) VALUES
('2012/2013'),
('2013/2014');
 
--
-- Contraintes pour les tables exportées
--
 
--
-- Contraintes pour la table `coeficient`
--
ALTER TABLE `coeficient`
  ADD CONSTRAINT `coeficient_ibfk_1` FOREIGN KEY (`matierec`) REFERENCES `matiere` (`matiere`),
  ADD CONSTRAINT `coeficient_ibfk_2` FOREIGN KEY (`seriec`) REFERENCES `serie` (`serie`);
 
--
-- Contraintes pour la table `eleve`
--
ALTER TABLE `eleve`
  ADD CONSTRAINT `eleve_ibfk_1` FOREIGN KEY (`ClasseEl`) REFERENCES `classe` (`classe`),
  ADD CONSTRAINT `eleve_ibfk_2` FOREIGN KEY (`serieEl`) REFERENCES `serie` (`serie`),
  ADD CONSTRAINT `eleve_ibfk_3` FOREIGN KEY (`lv1El`) REFERENCES `matiere` (`matiere`),
  ADD CONSTRAINT `eleve_ibfk_4` FOREIGN KEY (`lv2El`) REFERENCES `matiere` (`matiere`),
  ADD CONSTRAINT `eleve_ibfk_5` FOREIGN KEY (`cr`) REFERENCES `classe` (`classe`),
  ADD CONSTRAINT `eleve_ibfk_6` FOREIGN KEY (`session`) REFERENCES `session` (`session`);
 
--
-- Contraintes pour la table `lv1`
--
ALTER TABLE `lv1`
  ADD CONSTRAINT `lv1_ibfk_3` FOREIGN KEY (`matierelv1`) REFERENCES `matierelv` (`matierelv`),
  ADD CONSTRAINT `lv1_ibfk_1` FOREIGN KEY (`classelv1`) REFERENCES `classe` (`classe`),
  ADD CONSTRAINT `lv1_ibfk_2` FOREIGN KEY (`serielv1`) REFERENCES `serie` (`serie`);
 
--
-- Contraintes pour la table `lv2`
--
ALTER TABLE `lv2`
  ADD CONSTRAINT `lv2_ibfk_3` FOREIGN KEY (`matierelv2`) REFERENCES `matierelv` (`matierelv`),
  ADD CONSTRAINT `lv2_ibfk_1` FOREIGN KEY (`classelv2`) REFERENCES `classe` (`classe`),
  ADD CONSTRAINT `lv2_ibfk_2` FOREIGN KEY (`serielv2`) REFERENCES `serie` (`serie`);
 
--
-- Contraintes pour la table `note`
--
ALTER TABLE `note`
  ADD CONSTRAINT `note_ibfk_1` FOREIGN KEY (`idelevenote`) REFERENCES `eleve` (`ideleve`),
  ADD CONSTRAINT `note_ibfk_2` FOREIGN KEY (`matierenote`) REFERENCES `matiere` (`matiere`);
 
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;