par
eru » 21 janv. 2010, 20:19
J'avais évidemment bien simplifié les tables (en vrai il y en a une 10 aine d'imbriquées )
Je te mets le SQL
(merci de prendre du temps

)
--
-- Structure de la table `actes_pec` = TABLE1
--
CREATE TABLE `actes_pec` (
`IDPEC` int(100) NOT NULL auto_increment,
`IDS` int(100) NOT NULL,
`IDA` int(100) NOT NULL,
`IDV` int(100) NOT NULL,
`date` date NOT NULL,
`heure` varchar(20) collate utf8_unicode_ci NOT NULL,
`motif` text collate utf8_unicode_ci NOT NULL,
`diagnostic` varchar(100) collate utf8_unicode_ci NOT NULL,
`qtt` decimal(10,2) NOT NULL,
`remise` decimal(10,2) NOT NULL,
`sortie` varchar(15) collate utf8_unicode_ci NOT NULL default '0',
KEY `IDPEC` (`IDPEC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=119 ;
--
-- Structure de la table `actes` = TABLE2
--
CREATE TABLE `actes` (
`IDAC` int(255) NOT NULL auto_increment,
`titleg` varchar(255) collate utf8_unicode_ci NOT NULL,
`tva` decimal(10,2) NOT NULL,
`pu` decimal(10,2) NOT NULL,
`categorie` int(100) NOT NULL,
KEY `IDAC` (`IDAC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=133 ;
--
-- Structure de la table `actes_users` = TABLE3
--
CREATE TABLE `actes_users` (
`IDAU` int(100) NOT NULL auto_increment,
`IDPECAU` int(100) NOT NULL,
`IDACAU` int(100) NOT NULL,
`IDMAU` int(100) NOT NULL,
`IDSAU` int(100) NOT NULL default '1',
`typeAU` varchar(100) collate utf8_unicode_ci NOT NULL,
`dateAU` date NOT NULL,
`heureAU` varchar(20) collate utf8_unicode_ci NOT NULL,
`qttAU` decimal(10,2) NOT NULL,
`remiseAU` decimal(10,2) NOT NULL,
`ttcAU` decimal(10,2) NOT NULL,
KEY `IDAU` (`IDAU`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1522 ;
J'avais évidemment bien simplifié les tables (en vrai il y en a une 10 aine d'imbriquées ) :!:
Je te mets le SQL
(merci de prendre du temps :D )
[sql]
--
-- Structure de la table `actes_pec` = TABLE1
--
CREATE TABLE `actes_pec` (
`IDPEC` int(100) NOT NULL auto_increment,
`IDS` int(100) NOT NULL,
`IDA` int(100) NOT NULL,
`IDV` int(100) NOT NULL,
`date` date NOT NULL,
`heure` varchar(20) collate utf8_unicode_ci NOT NULL,
`motif` text collate utf8_unicode_ci NOT NULL,
`diagnostic` varchar(100) collate utf8_unicode_ci NOT NULL,
`qtt` decimal(10,2) NOT NULL,
`remise` decimal(10,2) NOT NULL,
`sortie` varchar(15) collate utf8_unicode_ci NOT NULL default '0',
KEY `IDPEC` (`IDPEC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=119 ;
--
-- Structure de la table `actes` = TABLE2
--
CREATE TABLE `actes` (
`IDAC` int(255) NOT NULL auto_increment,
`titleg` varchar(255) collate utf8_unicode_ci NOT NULL,
`tva` decimal(10,2) NOT NULL,
`pu` decimal(10,2) NOT NULL,
`categorie` int(100) NOT NULL,
KEY `IDAC` (`IDAC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=133 ;
--
-- Structure de la table `actes_users` = TABLE3
--
CREATE TABLE `actes_users` (
`IDAU` int(100) NOT NULL auto_increment,
`IDPECAU` int(100) NOT NULL,
`IDACAU` int(100) NOT NULL,
`IDMAU` int(100) NOT NULL,
`IDSAU` int(100) NOT NULL default '1',
`typeAU` varchar(100) collate utf8_unicode_ci NOT NULL,
`dateAU` date NOT NULL,
`heureAU` varchar(20) collate utf8_unicode_ci NOT NULL,
`qttAU` decimal(10,2) NOT NULL,
`remiseAU` decimal(10,2) NOT NULL,
`ttcAU` decimal(10,2) NOT NULL,
KEY `IDAU` (`IDAU`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1522 ;[/sql]