Citation:
CREATE TABLE IF NOT EXISTS `table1` (
`id1` int(11) NOT NULL auto_increment,
`nom` text NOT NULL,
`prenom` text NOT NULL,
`categorie` text NOT NULL,
`code1` text NOT NULL,
PRIMARY KEY (`id1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
Citation:
CREATE TABLE IF NOT EXISTS `table2` (
`id2` int(11) NOT NULL auto_increment,
`groupe` text NOT NULL,
`code2` text NOT NULL,
PRIMARY KEY (`id2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;
et les INSERT INTO
Citation:
INSERT INTO `table1` (`id1`,`nom`, `prenom`, `categorie`, `code1`) VALUES
(1, 'durant', 'andre', 'a', '001',),
(2, 'dupont', 'Jean', 'b', '002'),
(3, 'martin', 'Elodie', 'c', '003'),
(4, 'blanc', 'Dominique', 'd', '004'),
(5, 'rouge', 'Monique', 'e', '005'),
(6, 'vert', 'Francois', 'b', '006'),
(7, 'bleu', 'Fabien', 'a', '007'),
(8, 'noir', 'Jean', 'a', '008'),
(9, 'blanc', 'Marie', 'c', '009'),
Citation:
INSERT INTO `table2` (`id2`, `groupe`, `code2`) VALUES
(1, '1', '001'),
(2, '1', '002'),
(3, '1', '003'),
(4, '2', '004'),
(5, '2', '005'),
(6, '2', '006'),
(7, '3', '007'),
(8, '3', '008'),
(9, '3', '009'),