Forum

Résolu
mekni Messages postés 13 Date d'inscription   Statut Membre Dernière intervention   -  
mpmp93 Messages postés 6648 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour, qui peut m'aider a créer un forum simple qui permet:
1/ client affiche tous les sujets de forum .
2/lorsque le client choisie un sujet , les commentaire précédant s'affiche et le client ajout un commentaire
mes tables :
client :
'idclient' INT NOT NULL AUTO_INCREMENT ,

'nom' VARCHAR(45) NOT NULL ,

'prénom' VARCHAR(45) NOT NULL ,

'date_naissance' DATE NOT NULL ,

'e_mail' VARCHAR(70) NOT NULL ,

'sexe' CHAR NOT NULL ,

'pseudo' VARCHAR(45) NOT NULL ,

'mot_passe' VARCHAR(45) NOT NULL ,

PRIMARY KEY ('idclient') )

ENGINE = InnoDB;

forum:

CREATE TABLE IF NOT EXISTS 'Fix_it'.'forum' (

'idforum' INT NOT NULL AUTO_INCREMENT ,

'nom_forum' VARCHAR(45) NULL ,

'sujet_forum' VARCHAR(70) NULL ,

PRIMARY KEY ('idforum') )

ENGINE = InnoDB;

commenter

CREATE TABLE IF NOT EXISTS 'Fix_it'.'commenter' (

'client_idclient' INT NOT NULL ,

'forum_idforum' INT NOT NULL ,

'date_commentaire' TIMESTAMP NOT NULL ,

'commentaire' LONGTEXT NULL ,

PRIMARY KEY ('client_idclient', 'forum_idforum', 'date_commentaire') ,

CONSTRAINT 'fk_client_has_forum_client1'

FOREIGN KEY ('client_idclient' )

REFERENCES 'Fix_it'.'client' ('idclient' )

ON DELETE NO ACTION

ON UPDATE NO ACTION,

CONSTRAINT 'fk_client_has_forum_forum1'

FOREIGN KEY ('forum_idforum' )

REFERENCES 'Fix_it'.'forum' ('idforum' )

ON DELETE NO ACTION

ON UPDATE NO ACTION)

ENGINE = InnoDB;



CREATE INDEX 'fk_client_has_forum_forum1' ON 'Fix_it'.'commenter' ('forum_idforum' ASC) ;



CREATE INDEX 'fk_client_has_forum_client1' ON 'Fix_it'.'commenter' ('client_idclient' ASC) ;

1 réponse

mpmp93 Messages postés 6648 Date d'inscription   Statut Membre Dernière intervention   1 340
 
Bonjour,
Pas la peine de programmer: phpBB est la solution:
https://www.phpbb.com/
A+
0