Cette pub permet au site de vivre ...

Créer son forum

Après avoir terminer les articles pour développer votre site de A à Z maintenant nous allons nous attaquer à la création d'un forum complet !

Pour commencer nous allons créer 3 nouvelles tables dans notre base de données !


Côté SQL


Table forum


CREATE TABLE forum (
  id int(255) NOT NULL,
  titre varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  date_creation datetime NOT NULL,
  ordre int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


Table topic


CREATE TABLE topic (
  id int(255) NOT NULL,
  id_forum int(255) NOT NULL,
  titre varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  contenu text COLLATE utf8mb4_unicode_ci NOT NULL,
  date_creation datetime NOT NULL,
  id_user int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


Table topic_commentaire


CREATE TABLE topic_commentaire (
  id int(255) NOT NULL,
  id_topic int(255) NOT NULL,
  id_user int(255) NOT NULL,
  text text COLLATE utf8mb4_unicode_ci NOT NULL,
  date_creation datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Cette pub permet au site de vivre ...
Voir d'autres articles
Créer son site
Barre de recherche : Complète
HTML
Mise en évidence du texte avec <em>, <strong>, <u> et <s>
JS
Déclaration de fonctions
Cette pub permet au site de vivre ...