From 60cfa8b0e1af812aab6baeeff2f6bf50266aa19a Mon Sep 17 00:00:00 2001 From: Louis <louis.caille@hotmail.fr> Date: Thu, 19 Dec 2019 00:24:30 +0100 Subject: [PATCH] ajout de favoris au compte de Matthieu --- config/pima.sql | 60 +++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/config/pima.sql b/config/pima.sql index 831930a..8d5a428 100644 --- a/config/pima.sql +++ b/config/pima.sql @@ -1,15 +1,23 @@ -- phpMyAdmin SQL Dump --- version 4.9.0.1 +-- version 4.8.5 -- https://www.phpmyadmin.net/ -- --- Hôte : localhost:8889 --- Généré le : mer. 18 déc. 2019 à 21:34 +-- Hôte : 127.0.0.1:3306 +-- Généré le : mer. 18 déc. 2019 à 23:23 -- Version du serveur : 5.7.26 --- Version de PHP : 7.3.8 +-- Version de PHP : 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; 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 utf8mb4 */; + -- -- Base de données : `pima` -- @@ -20,7 +28,8 @@ SET time_zone = "+00:00"; -- Structure de la table `categorie` -- -CREATE TABLE `categorie` ( +DROP TABLE IF EXISTS `categorie`; +CREATE TABLE IF NOT EXISTS `categorie` ( `id_categorie` int(2) NOT NULL, `nom_categorie` varchar(30) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -43,7 +52,8 @@ INSERT INTO `categorie` (`id_categorie`, `nom_categorie`) VALUES -- Structure de la table `favoris` -- -CREATE TABLE `favoris` ( +DROP TABLE IF EXISTS `favoris`; +CREATE TABLE IF NOT EXISTS `favoris` ( `id_artiste` int(11) NOT NULL, `id_user` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; @@ -53,7 +63,11 @@ CREATE TABLE `favoris` ( -- INSERT INTO `favoris` (`id_artiste`, `id_user`) VALUES -(4, 2); +(3, 2), +(4, 2), +(6, 2), +(21, 2), +(17, 2); -- -------------------------------------------------------- @@ -61,7 +75,8 @@ INSERT INTO `favoris` (`id_artiste`, `id_user`) VALUES -- Structure de la table `influenceurs` -- -CREATE TABLE `influenceurs` ( +DROP TABLE IF EXISTS `influenceurs`; +CREATE TABLE IF NOT EXISTS `influenceurs` ( `id_artiste` int(11) NOT NULL, `nom_artiste` varchar(30) NOT NULL, `sexe` varchar(1) NOT NULL, @@ -69,7 +84,8 @@ CREATE TABLE `influenceurs` ( `tag_instagram` varchar(30) NOT NULL, `nb_youtube` int(11) NOT NULL, `nb_instagram` int(11) NOT NULL, - `id_categorie` int(11) NOT NULL + `id_categorie` int(11) NOT NULL, + PRIMARY KEY (`id_artiste`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- @@ -79,7 +95,7 @@ CREATE TABLE `influenceurs` ( INSERT INTO `influenceurs` (`id_artiste`, `nom_artiste`, `sexe`, `tag_youtube`, `tag_instagram`, `nb_youtube`, `nb_instagram`, `id_categorie`) VALUES (1, 'EnjoyPhoenix', 'F', 'EnjoyPhoenix', 'EnjoyPhoenix', 3610000, 4847027, 5), (2, 'Hugzer', 'M', '', 'hugo91600', 0, 220, 1), -(3, 'Ariana Grande', 'F', 'osnapitzari', 'arianagrande', 39000000, 168690804, 2), +(3, 'Ariana Grande', 'F', 'osnapitzari', 'arianagrande', 39000000, 168959643, 2), (4, 'Bilal Hassani', 'M', 'bigiling', 'iambilalhassani', 1090000, 631976, 2), (5, 'Mister V', 'M', 'mistervofficial', 'yvick', 5310000, 3870967, 3), (6, 'Cyprien', 'M', 'MonsieurDream', '6pri1', 13400000, 5815652, 3), @@ -113,7 +129,8 @@ INSERT INTO `influenceurs` (`id_artiste`, `nom_artiste`, `sexe`, `tag_youtube`, -- Structure de la table `users` -- -CREATE TABLE `users` ( +DROP TABLE IF EXISTS `users`; +CREATE TABLE IF NOT EXISTS `users` ( `id_user` int(11) NOT NULL, `nom` varchar(30) NOT NULL, `prenom` varchar(30) NOT NULL, @@ -128,22 +145,11 @@ CREATE TABLE `users` ( INSERT INTO `users` (`id_user`, `nom`, `prenom`, `mail`, `mdp`, `bday`) VALUES (1, 'SELLAMBIN', 'HUGO', 'hugo.sell@ensiie.fr', 'hugohugo', '2019-10-01'), -(2, 'GOSSET', 'Matthieu', 'matthieu.gosset@yahoo.fr', 'matthieu', '1998-04-25'), +(2, 'GOSSET', 'Matthieu', 'matthieu.gosset2@yahoo.fr', 'matthieu', '1998-04-25'), (3, 'sellambin', 'hugo', 'hugo91@gmail.com', 'hugohugoo', '2004-12-04'), (4, 'Caille', 'Louis', 'louis.caille@hotmail.fr', 'helloworld', '1998-08-13'); +COMMIT; --- --- Index pour les tables déchargées --- - --- --- Index pour la table `favoris` --- -ALTER TABLE `favoris` - ADD PRIMARY KEY (`id_artiste`,`id_user`); - --- --- Index pour la table `influenceurs` --- -ALTER TABLE `influenceurs` - ADD PRIMARY KEY (`id_artiste`); \ No newline at end of file +/*!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 */; -- GitLab