CREATE TABLE `lots` (
`id` int(11) NOT NULL auto_increment,
`position` int(11) NOT NULL,
`nom` varchar(40) NOT NULL,
PRIMARY KEY (`id`)
)
CREATE TABLE `clients_entreprises` (
`id` int(11) NOT NULL auto_increment,
`id_client` int(11) NOT NULL,
`id_lot` int(11) NOT NULL,
`id_entreprise` int(11) NOT NULL,
`previsionnel` float NOT NULL,
`text` varchar(255) NOT NULL,
`reel` varchar(255) NOT NULL,
`motif` varchar(255) NOT NULL,
`diff_entreprise` varchar(60) NOT NULL,
PRIMARY KEY (`id`)
)
tables lots
id position nom
12 6 Portes Intérieures
13 7 Plomberie Sanitaire
14 8 Plomberie Chauffage
16 10 Chape
...
table clients_entreprises
id id_client id_lot id_entreprise previsionnel text reel motif diff_entreprise
1 2 33 6 120
2 2 36 0 0
3 2 37 0 0
4 2 38 0 0
...
Partager