Commit 3b22c27f by Roy Junedi Simamora

perubahan database dan penambahan file gambar

parent f0f3b8ed
......@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 15, 2017 at 04:37 PM
-- Generation Time: May 19, 2017 at 05:30 PM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
......@@ -33,14 +33,15 @@ CREATE TABLE IF NOT EXISTS `admin` (
`username` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
`role` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `admin`
--
INSERT INTO `admin` (`id_admin`, `nama`, `email`, `username`, `password`, `role`) VALUES
(0, 'meno', 'meno@gmail.com', 'meno', 'meno', 0);
(1, 'meno', 'meno@gmail.com', 'meno', 'meno', 0),
(2, 'Roy Junedi', 'royjunedi123@gmail.com', 'admin', 'admin', 0);
-- --------------------------------------------------------
......@@ -73,22 +74,19 @@ CREATE TABLE IF NOT EXISTS `komentar` (
`isi` varchar(200) NOT NULL,
`email` varchar(25) NOT NULL,
`hp` varchar(12) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `komentar`
--
INSERT INTO `komentar` (`id_komentar`, `nama`, `isi`, `email`, `hp`) VALUES
(4, 'Pratiwi', 'nice', 'tiwi@yahoo.co.id', '2147483647'),
(8, 'marthina', 'semangat mei', 'grace@gmail.com', '2147483647'),
(9, 'marthina', 'djkcgsdkug', 'meyrsjhkjsdh', '08126098876'),
(11, 'franciskus', 'terimaksih atas kemudahannya', 'frans@yahoo.co.id', '081230988746'),
(13, 'maret', 'terimakasih telah hadir di bulbul', 'maret@yahoo.co.id', '09864839874'),
(14, 'nomi', 'thank', 'mdnlknd@gmail.com', '0998765978'),
(15, 'nomi', 'thank', 'mdnlknd@gmail.com', '0998765978'),
(16, 'wqr', 'gfjgfjhfjhvhvkjv', 'sehat@del.ac.id', '098'),
(17, 'wqr', 'gfjgfjhfjhvhvkjv', 'sehat@del.ac.id', '098');
(19, 'Roy Junedi', 'Makanannya Lumayan !! tapi kurang . Kurangnya ga bisa di antar langsung ke tempat.', 'royjunedi123@gmail.com', ' 08127799012'),
(20, 'roy', 'mantapss', 'roy@del.ac.id', '08129990901');
-- --------------------------------------------------------
......@@ -146,7 +144,7 @@ CREATE TABLE IF NOT EXISTS `menu` (
INSERT INTO `menu` (`id_menu`, `nama`, `harga`, `gambar`, `kategori_id`) VALUES
(3, 'Ikan Bakar', 25000, 'ikan bakar.jpg', 1),
(4, 'ayam bakar', 15000, 'ayam bakar.jpg', 1),
(4, 'ayam bakar', 12000, 'ayam bakar.jpg', 1),
(5, 'Bihun Kuah', 13000, 'bihun kuah.Jpeg', 1),
(6, 'Ikan Goreng', 20000, 'ikan goreng.jpg', 1),
(7, 'Bihun Goreng', 13000, 'bihun goreng.JPG', 1),
......@@ -156,7 +154,7 @@ INSERT INTO `menu` (`id_menu`, `nama`, `harga`, `gambar`, `kategori_id`) VALUES
(11, 'Mie Kuning Goreng', 15000, 'mi kuning goreng.jpg', 1),
(12, 'Tumis Kangkung', 8000, 'tumis kangkung.jpg', 1),
(13, 'Jus Alpukat', 8000, 'jus-alpukat.jpg', 2),
(14, 'Jus Jeruk', 8, 'jeruk.jpeg', 2),
(14, 'Jus Jeruk', 8000, 'jeruk.jpeg', 2),
(15, 'jus apel', 10000, 'jus-apel.jpg', 2),
(16, 'Bandrek', 8000, 'bandrek.jpg', 2),
(17, 'Jus buah naga', 8000, 'jus naga.jpg', 2),
......@@ -176,11 +174,30 @@ CREATE TABLE IF NOT EXISTS `pemesanan` (
`menu_id` int(11) DEFAULT NULL,
`tanggal` date NOT NULL,
`jumlah` varchar(45) NOT NULL,
`total_harga` double NOT NULL,
`total_harga` double DEFAULT NULL,
`id_pemesanan` int(11) NOT NULL,
`bukti` varchar(200) NOT NULL
`bukti` varchar(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `role`
--
CREATE TABLE IF NOT EXISTS `role` (
`role_id` int(11) NOT NULL,
`nama` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `role`
--
INSERT INTO `role` (`role_id`, `nama`) VALUES
(0, 'Admin'),
(1, 'Member');
--
-- Indexes for dumped tables
--
......@@ -189,7 +206,7 @@ CREATE TABLE IF NOT EXISTS `pemesanan` (
-- Indexes for table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id_admin`);
ADD PRIMARY KEY (`id_admin`,`role`), ADD KEY `role_id_FK` (`role`);
--
-- Indexes for table `kategori`
......@@ -207,7 +224,7 @@ ALTER TABLE `komentar`
-- Indexes for table `member`
--
ALTER TABLE `member`
ADD PRIMARY KEY (`id_member`);
ADD PRIMARY KEY (`id_member`,`role`), ADD KEY `id_member` (`id_member`,`role`), ADD KEY `member_role_id_FK` (`role`);
--
-- Indexes for table `menu`
......@@ -222,10 +239,21 @@ ALTER TABLE `pemesanan`
ADD PRIMARY KEY (`id_pemesanan`), ADD KEY `member_id` (`member_id`), ADD KEY `menu_id` (`menu_id`);
--
-- Indexes for table `role`
--
ALTER TABLE `role`
ADD PRIMARY KEY (`role_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin`
--
ALTER TABLE `admin`
MODIFY `id_admin` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `kategori`
--
ALTER TABLE `kategori`
......@@ -234,7 +262,7 @@ ALTER TABLE `kategori`
-- AUTO_INCREMENT for table `komentar`
--
ALTER TABLE `komentar`
MODIFY `id_komentar` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=18;
MODIFY `id_komentar` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT for table `member`
--
......@@ -251,10 +279,27 @@ ALTER TABLE `menu`
ALTER TABLE `pemesanan`
MODIFY `id_pemesanan` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `role`
--
ALTER TABLE `role`
MODIFY `role_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `admin`
--
ALTER TABLE `admin`
ADD CONSTRAINT `role_id_FK` FOREIGN KEY (`role`) REFERENCES `role` (`role_id`);
--
-- Constraints for table `member`
--
ALTER TABLE `member`
ADD CONSTRAINT `member_role_id_FK` FOREIGN KEY (`role`) REFERENCES `role` (`role_id`);
--
-- Constraints for table `menu`
--
ALTER TABLE `menu`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment