ini struktur tablenya :
— phpMyAdmin SQL Dump
— version 2.11.4
— http://www.phpmyadmin.net
—
— Host: localhost
— Generation Time: Mar 25, 2014 at 10:30 AM
— Server version: 5.0.51
— PHP Version: 5.2.5
SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;
—
— Database: `quiz`
—
CREATE DATABASE `quiz` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `quiz`;
— ——————————————————–
—
— Table structure for table `merk`
—
CREATE TABLE IF NOT EXISTS `merk` (
`id_merk` int(11) NOT NULL auto_increment,
`merk` varchar(50) NOT NULL,
PRIMARY KEY (`id_merk`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
—
— Dumping data for table `merk`
—
INSERT INTO `merk` (`id_merk`, `merk`) VALUES
(1, ‘Honda’),
(2, ‘Yamaha’),
(3, ‘Suzuki’),
(4, ‘Kawasaki’),
(5, ‘Ducati’);
— ——————————————————–
—
— Table structure for table `motor`
—
CREATE TABLE IF NOT EXISTS `motor` (
`id_motor` int(11) NOT NULL auto_increment,
`id_merk` int(11) NOT NULL,
`id_tipe` int(11) NOT NULL,
`jenis` varchar(150) NOT NULL,
`harga` int(50) NOT NULL,
PRIMARY KEY (`id_motor`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
—
— Dumping data for table `motor`
—
INSERT INTO `motor` (`id_motor`, `id_merk`, `id_tipe`, `jenis`, `harga`) VALUES
(1, 1, 1, ‘Supra X 125’, 15000000),
(2, 1, 2, ‘Vario’, 16000000),
(3, 1, 3, ‘CBR 250 R’, 45000000),
(4, 2, 1, ‘Jupiter Z’, 15400000),
(5, 2, 2, ‘Mio’, 13000000),
(6, 2, 3, ‘Vixion’, 21000000),
(7, 3, 1, ‘Shogun’, 14000000),
(8, 3, 2, ‘Spin’, 13000000),
(9, 3, 3, ‘Satria F’, 19000000),
(10, 3, 4, ‘Inazuma’, 42000000),
(11, 4, 1, ‘Edge’, 13000000),
(12, 4, 3, ‘Ninja 250 ‘, 50000000),
(13, 4, 5, ‘D-Tracker 150’, 35000000),
(14, 5, 3, ‘Desmosedici’, 540000000),
(15, 5, 4, ‘Monster’, 125000000);
— ——————————————————–
—
— Table structure for table `pembeli`
—
CREATE TABLE IF NOT EXISTS `pembeli` (
`id_pembeli` int(11) NOT NULL auto_increment,
`nama` varchar(200) NOT NULL,
`alamat` varchar(100) NOT NULL,
`jk` varchar(1) NOT NULL,
`telp` varchar(50) NOT NULL,
`id_motor` int(11) NOT NULL,
`jml_beli` int(11) NOT NULL,
PRIMARY KEY (`id_pembeli`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
—
— Dumping data for table `pembeli`
—
— ——————————————————–
—
— Table structure for table `tipe`
—
CREATE TABLE IF NOT EXISTS `tipe` (
`id_tipe` int(11) NOT NULL auto_increment,
`tipe` varchar(50) NOT NULL,
PRIMARY KEY (`id_tipe`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
—
— Dumping data for table `tipe`
—
INSERT INTO `tipe` (`id_tipe`, `tipe`) VALUES
(1, ‘Bebek’),
(2, ‘Matik’),
(3, ‘Sport’),
(4, ‘Touring’),
(5, ‘Trail’);