En gros j'ai ceci si j'ai bien compris au niveau nomenclature.
Si c'est pas bon tapez moi sur les doigts.
J'ai mes 4 tables prêtes pour faire de la cuisine ^^
Il y aurait apparemment un problème avec mon champ 'qte' dans la table
de liaison d'après d'autres posts..
Merci à vous
CREATE TABLE `clients` (
`id` int(11) NOT NULL auto_increment,
`numero` varchar(20) collate utf8_unicode_ci NOT NULL,
`societe` varchar(150) collate utf8_unicode_ci NOT NULL,
`nom` varchar(100) collate utf8_unicode_ci NOT NULL,
`prenom` varchar(100) collate utf8_unicode_ci NOT NULL,
`adresse` varchar(150) collate utf8_unicode_ci NOT NULL,
`cp` varchar(20) collate utf8_unicode_ci NOT NULL,
`ville` varchar(100) collate utf8_unicode_ci NOT NULL,
`pays` varchar(100) collate utf8_unicode_ci NOT NULL,
`tel` varchar(100) collate utf8_unicode_ci NOT NULL,
`fax` varchar(100) collate utf8_unicode_ci NOT NULL,
`gsm` varchar(100) collate utf8_unicode_ci NOT NULL,
`email` varchar(100) collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=6 ;
CREATE TABLE `devis` (
`id` int(11) NOT NULL auto_increment,
`numero` varchar(50) collate utf8_unicode_ci NOT NULL,
`date_creation` int(11) NOT NULL,
`description` blob NOT NULL,
`remarques` blob NOT NULL,
`client_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;
CREATE TABLE `produits` (
`id` int(11) NOT NULL auto_increment,
`reference` varchar(100) collate utf8_unicode_ci NOT NULL,
`description` blob NOT NULL,
`prix_htva` float NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=2 ;
CREATE TABLE `produits_devis` (
`id` int(11) NOT NULL auto_increment,
`qte` float NOT NULL,
`prix_htva` float NOT NULL,
`produit_id` int(11) NOT NULL,
`devi_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;