par
reverb » 10 sept. 2013, 13:12
Re,
Merci pour ton aide

,
j'ai rajouté un champs date de créa de l'oeuvre, et date d'édition de l'oeuvre.
-- Structure de la table `oeuvre_artiste`
--
CREATE TABLE IF NOT EXISTS `oeuvre_artiste` (
`artiste_id` int(11) NOT NULL,
`titre_oeuvre` varchar(100) NOT NULL,
`description_oeuvre` text NOT NULL,
`image_oeuvre` varchar(100) NOT NULL DEFAULT 'défaut.jpg',
`oeuvre_categorie` int(11) NOT NULL,
`oeuvre_style` int(11) NOT NULL,
`oeuvre_id` int(11) NOT NULL AUTO_INCREMENT,
`date_crea` date NOT NULL,
`date_edit` date NOT NULL,
PRIMARY KEY (`oeuvre_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stockage oeuvre' AUTO_INCREMENT=1 ;
Concernant 'oeuvre_categorie' si je ne me trompe pas il est également possible de le mettre en vachar et par la suite quand je créerai une nouvelle table pour gérer les catégories il me suffira juste de faire correspondre les noms des catégorie choisie ^^' ?
j'ai également créé 2 autres tables qui me permettra par la suite d'utiliser un fonctionnement dynamique pour la classification
-- Structure de la table `oeuvre_categorie`
--
CREATE TABLE IF NOT EXISTS `oeuvre_categorie` (
`id_oeuvre_id` int(11) NOT NULL,
`oeuvre_categorie` int(11) NOT NULL,
`oeuvre_nom_cat` varchar(50) NOT NULL,
`cat_ordre` int(11) NOT NULL,
PRIMARY KEY (`id_oeuvre_id`),
KEY `oeuvre_nom_cat` (`oeuvre_nom_cat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Categorie des oeuvres';
-- Structure de la table `oeuvre_style`
--
CREATE TABLE IF NOT EXISTS `oeuvre_style` (
`id_oeuvre` int(11) NOT NULL,
`oeuvre_style` int(11) NOT NULL,
`oeuvre_nom_style` varchar(50) NOT NULL,
`oeuvre_style_ordre` int(11) NOT NULL,
KEY `oeuvre_nom_style` (`oeuvre_nom_style`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Oeuvre style';
merci encore pour ton attention

.
Re,
Merci pour ton aide :D,
j'ai rajouté un champs date de créa de l'oeuvre, et date d'édition de l'oeuvre.
[sql]-- Structure de la table `oeuvre_artiste`
--
CREATE TABLE IF NOT EXISTS `oeuvre_artiste` (
`artiste_id` int(11) NOT NULL,
`titre_oeuvre` varchar(100) NOT NULL,
`description_oeuvre` text NOT NULL,
`image_oeuvre` varchar(100) NOT NULL DEFAULT 'défaut.jpg',
`oeuvre_categorie` int(11) NOT NULL,
`oeuvre_style` int(11) NOT NULL,
`oeuvre_id` int(11) NOT NULL AUTO_INCREMENT,
`date_crea` date NOT NULL,
`date_edit` date NOT NULL,
PRIMARY KEY (`oeuvre_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stockage oeuvre' AUTO_INCREMENT=1 ;
[/sql]
Concernant 'oeuvre_categorie' si je ne me trompe pas il est également possible de le mettre en vachar et par la suite quand je créerai une nouvelle table pour gérer les catégories il me suffira juste de faire correspondre les noms des catégorie choisie ^^' ?
j'ai également créé 2 autres tables qui me permettra par la suite d'utiliser un fonctionnement dynamique pour la classification :)
[sql]-- Structure de la table `oeuvre_categorie`
--
CREATE TABLE IF NOT EXISTS `oeuvre_categorie` (
`id_oeuvre_id` int(11) NOT NULL,
`oeuvre_categorie` int(11) NOT NULL,
`oeuvre_nom_cat` varchar(50) NOT NULL,
`cat_ordre` int(11) NOT NULL,
PRIMARY KEY (`id_oeuvre_id`),
KEY `oeuvre_nom_cat` (`oeuvre_nom_cat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Categorie des oeuvres';
-- Structure de la table `oeuvre_style`
--
CREATE TABLE IF NOT EXISTS `oeuvre_style` (
`id_oeuvre` int(11) NOT NULL,
`oeuvre_style` int(11) NOT NULL,
`oeuvre_nom_style` varchar(50) NOT NULL,
`oeuvre_style_ordre` int(11) NOT NULL,
KEY `oeuvre_nom_style` (`oeuvre_nom_style`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Oeuvre style';[/sql]
merci encore pour ton attention :).