Cette pub permet au site de vivre ...

Créer son blog

Développer son Blog de A à Z


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

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


Côté SQL


Table blog


CREATE TABLE blog (
  id int(255) NOT NULL AUTO_INCREMENT,
  id_user int(255) NOT NULL,
  titre varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  text text COLLATE utf8mb4_unicode_ci NOT NULL,
  date_creation datetime NOT NULL,
  id_categorie int(255) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


Table blog_commentaire


CREATE TABLE blog_commentaire (
  id int(255) NOT NULL AUTO_INCREMENT,
  id_user int(255) NOT NULL,
  id_blog int(255) NOT NULL,
  text text COLLATE utf8mb4_unicode_ci NOT NULL,
  date_creation datetime NOT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


Table categorie


CREATE TABLE categorie (
  id int(255) NOT NULL AUTO_INCREMENT,
  id_categorie int(255) NOT NULL,
  titre varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Cette pub permet au site de vivre ...
Voir d'autres articles
PHP
Les opérateur PHP
Créer son site
Créer un profil PHP
Créer son site
Déconnexion PHP
Cette pub permet au site de vivre ...