https://github.com/lucasrmagalhaes/movies_controll-mysql
Como Modelar um Banco de Controle de Séries Assistidas com MySQL
https://github.com/lucasrmagalhaes/movies_controll-mysql
dio mysql phpmyadmin
Last synced: 3 months ago
JSON representation
Como Modelar um Banco de Controle de Séries Assistidas com MySQL
- Host: GitHub
- URL: https://github.com/lucasrmagalhaes/movies_controll-mysql
- Owner: lucasrmagalhaes
- License: mit
- Created: 2021-11-07T22:49:19.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T15:45:58.000Z (over 2 years ago)
- Last Synced: 2025-04-06T18:08:44.306Z (6 months ago)
- Topics: dio, mysql, phpmyadmin
- Language: JavaScript
- Homepage:
- Size: 8.08 MB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
Movies Controll
[Back-end](http://localhost:5000/ "Back-end")
[Front-end](http://localhost:3000/ "Front-end")```
CREATE TABLE movies(
id INT PRIMARY KEY AUTO_INCREMENT,
type INT NOT NULL,
name VARCHAR(30) NOT NULL,
total_ep INT,
atual_ep INT,
last_view DATE DEFAULT CURRENT_TIMESTAMP
)
``````
INSERT INTO
movies(`id`, `type`, `name`, `total_ep`, `atual_ep`, `last_view`)
VALUES
(1, 0, 'Friends', 10, 1, current_timestamp())
``````
INSERT INTO
movies(id, type, name, total_ep, last_view)
VALUES
(2, 1, 'Avengers', NULL, current_timestamp())
``````
UPDATE
`movies`
SET
`last_view` = '2021-11-07'
WHERE
`movies`.`id` = 1;
``````
DELETE FROM
movies
WHERE
id = 2
```