This file contains hidden or 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
mysql> SELECT wi.firstname,wi.lastname,pl.role,te.name FROM wizard AS wi JOIN player AS pl ON wi.id=wizard_id JOIN team AS te ON te.id=team_id ORDER BY te.name ASC; | |
+-------------+-----------------+--------+------------+ | |
| firstname | lastname | role | name | | |
+-------------+-----------------+--------+------------+ | |
| Sirius | Black | beater | Gryffindor | | |
| Frank | Longbottom | chaser | Gryffindor | | |
| Romilda | Vane | seeker | Gryffindor | | |
| Albus | Dumbledore | chaser | Gryffindor | | |
| Harry | Potter | beater | Gryffindor | | |
| Lee | Jordan | chaser | Gryffindor | |
This file contains hidden or 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 = 3003; | |
const connection = require('./conf'); | |
app.use(express.json()) | |
app.use(express.urlencoded({extended: true})) | |
app.delete('/api/movies/:id',(req,res) =>{ | |
const idMovie= req.params.id | |
connection.query('DELETE FROM movie WHERE id = ?', [idMovie], err =>{ |
This file contains hidden or 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 = 3002; | |
const connection = require('./conf'); | |
app.use(express.json()) | |
app.use(express.urlencoded({extended: true})) | |
app.put("/api/movies/:id",(req,res) => { | |
const idMovie= req.params.id | |
const formData= req.body |
This file contains hidden or 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 = 3001; | |
const connection = require('./conf'); | |
app.use(express.json()) | |
app.use(express.urlencoded({extended: true})) | |
app.get('/', (request, response) => { |
This file contains hidden or 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 = 3001; | |
const connection = require('./conf'); | |
app.use(express.json()) | |
app.use(express.urlencoded({extended: true})) | |
app.get('/', (request, response) => { |
This file contains hidden or 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 = 3001; | |
const connection = require('./conf'); | |
app.use(express.json()) | |
app.use(express.urlencoded({extended: true})) | |
app.get('/', (request, response) => { |
This file contains hidden or 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
mysql> SELECT firstname, lastname, age FROM person; | |
ERROR 1146 (42S02): Table 'kaam.person' doesn't exist | |
mysql> SELECT firstname, lastname, age FROM Person; | |
+-------------+---------------+-----+ | |
| firstname | lastname | age | | |
+-------------+---------------+-----+ | |
| Arthur | Pendragon | 35 | | |
| Guenièvre | NULL | 30 | | |
| Merlin | NULL | 850 | | |
| Perceval | NULL | 36 | |
This file contains hidden or 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() | |
app.use(express.json()) | |
app.use(express.urlencoded({extended: true})) | |
app.listen(8001,() => console.log('Hello world')) | |
const homeRouter = express.Router() | |
const postsRouter = express.Router() | |
const newRouter= express.Router() |
This file contains hidden or 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; | |
const connection = require('./conf'); | |
app.get('/', (request, response) => { | |
response.send('Bienvenue sur Express'); | |
}); | |
This file contains hidden or 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('/', (request, response) => { | |
response.send('Bienvenue sur Express'); | |
}); | |
app.get('/api/movies', (request, response) => { | |
response.send('Récupération de tous les films'); |