This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Counter Redux</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- Redux CDN --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.1/redux.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const connection = require('./conf'); | |
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
const bodyParser = require('body-parser'); | |
app.use(bodyParser.json()); | |
app.use(bodyParser.urlencoded({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Retourne le nom des équipes et le nombre de joueurs par équipe, le tout classé par nombre de joueurs par équipe, de la plus nombreuse à la moins nombreuse: | |
mysql> select t.name, count(*) as nb_student | |
-> from player p | |
-> join team t on t.id=p.team_id | |
-> group by t.name | |
-> order by nb_student desc; | |
Retourne uniquement les noms des équipes complètes (ayant 14 joueurs ou plus, c’est-à- dire 7 joueurs et 7 remplaçants minimum), classés par ordre alphabétique: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const connection = require('./conf'); | |
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
const bodyParser = require('body-parser'); | |
app.use(bodyParser.json()); | |
app.use(bodyParser.urlencoded({ | |
extended: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const connection = require('./conf'); | |
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
const bodyParser = require('body-parser'); | |
app.use(bodyParser.json()); | |
app.use(bodyParser.urlencoded({ | |
extended: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const connection = require('./conf'); | |
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
const bodyParser = require('body-parser'); | |
// Support JSON-encoded bodies | |
app.use(bodyParser.json()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const connection = require('./conf'); | |
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
app.get('/api/movie', (req, res) => { | |
// connection à la base de données, et sélection des employés | |
connection.query('SELECT * from movie', (err, results) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
const port = 3000; | |
app.get('/', (req, res) => { | |
res.send('Bienvenue sur Express'); | |
}); | |
app.get('/api/movie', (req, res) => { | |
res.send('Récupération de tout les films'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let http = require('http') | |
let url = require('url') | |
let port = 3000 | |
let server = http.createServer((request, response) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ordre par équipe: | |
select team.name, wizard.lastname, wizard.firstname, player.role from player join wizard on wizard.id=player.wizard_id inner join team on team.id=player.team_id order by name; | |
ordre par role: | |
select team.name, wizard.lastname, wizard.firstname, player.role from player join wizard on wizard.id=player.wizard_id inner join team on team.id=player.team_id order by role; | |
ordre par nom: | |
select team.name, wizard.lastname, wizard.firstname, player.role from player join wizard on wizard.id=player.wizard_id inner join team on team.id=player.team_id order by lastname; | |
ordre par prenom: |
NewerOlder