De database
CREATE TABLE merk ( merk_id int(2) NOT NULL auto_increment, merk varchar(25) NOT NULL default '', PRIMARY KEY (merk_id) ) TYPE=MyISAM;
# # zet de gegevens in tabel `merk` #
INSERT INTO merk VALUES (1, 'Opel'); INSERT INTO category VALUES (2, 'Ford'); INSERT INTO category VALUES (3, 'Nissan'); INSERT INTO category VALUES (4, 'Peugeot');
# -------------------------------------------------------- # # maak tabel `type` #
CREATE TABLE type ( type_id int(2) int(2) NOT NULL auto_increment,merk_id int(2) NOT NULL default '0', type varchar(25) NOT NULL default '', PRIMARY KEY (type_id) ) TYPE=MyISAM;
# # t de gegevens in tabel `type` #
INSERT INTO type VALUES (1, 1, 'Corsa'); INSERT INTO type VALUES (2, 1, 'Vectra'); INSERT INTO type VALUES (3, 1, 'Omega'); INSERT INTO type VALUES (4, 1, 'Astra'); INSERT INTO type VALUES (5, 2, 'Focus'); INSERT INTO type VALUES (6, 2, 'Escort'); INSERT INTO type VALUES (7, 2, 'Ka'); INSERT INTO type VALUES (8, 2, 'Fiesta'); INSERT INTO type VALUES (9, 3, 'Almera'); INSERT INTO type VALUES (10, 3, 'Bluebird'); INSERT INTO type VALUES (11, 3, 'Pathfinder'); INSERT INTO type VALUES (12, 3, 'Patrol'); INSERT INTO type VALUES (13, 4, '306'); INSERT INTO type VALUES (14, 4, '405'); INSERT INTO type VALUES (15, 4, '2007'); INSERT INTO type VALUES (16, 4, '205');