edit

parent c215caa8
-- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2017 at 04:16 PM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `cafe_db`
--
-- --------------------------------------------------------
--
-- Table structure for table `kategori`
--
CREATE TABLE IF NOT EXISTS `kategori` (
`id` int(11) NOT NULL,
`nama` varchar(7) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `kategori`
--
INSERT INTO `kategori` (`id`, `nama`) VALUES
(1, 'makanan'),
(2, 'minuman');
-- --------------------------------------------------------
--
-- Table structure for table `komentar`
--
CREATE TABLE IF NOT EXISTS `komentar` (
`id` int(11) NOT NULL,
`name` varchar(50) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`komentar` text
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `komentar`
--
INSERT INTO `komentar` (`id`, `name`, `email`, `komentar`) VALUES
(4, 'Marit', 'maritia@yahoo.com', 'kai ken\r\n'),
(5, 'Sule', 'Priktiew@gmail.com', 'bfhsfsbfsdf');
-- --------------------------------------------------------
--
-- Table structure for table `menu`
--
CREATE TABLE IF NOT EXISTS `menu` (
`id` int(11) NOT NULL,
`id_karyawan` int(11) DEFAULT NULL,
`nama` varbinary(64) DEFAULT NULL,
`harga` varchar(9) DEFAULT NULL,
`gambar` varbinary(64) DEFAULT NULL,
`deskripsi` varchar(32) DEFAULT NULL,
`id_kategori` int(11) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `menu`
--
INSERT INTO `menu` (`id`, `id_karyawan`, `nama`, `harga`, `gambar`, `deskripsi`, `id_kategori`) VALUES
(5, NULL, 0x4179616d2050656e796574, '23.000', 0x6179616d2070656e7965742e6a7067, 'Enak dan Gurih', NULL),
(6, NULL, 0x426562656b20476f72656e67, '20.000', 0x626562656b20676f72656e672e6a7067, 'Sedap', NULL),
(7, NULL, 0x4e61736920476f72656e67202b204179616d, '16.000', 0x6e61736920676f72656e67202b206179616d2e6a7067, 'Enak', NULL),
(8, NULL, 0x4461756e205562692054756d62756b, '10.000', 0x6461756e207562692074756d62756b2e6a7067, 'Sedap', NULL),
(9, NULL, 0x426968756e204b756168, '14.000', 0x626968756e206b7561682e6a7067, 'Enak bangetttt', NULL),
(10, NULL, 0x496e646f6d696520476f72656e67, '10.000', 0x696e646f6d696520676f72656e672e6a7067, 'Seleraku', NULL),
(11, NULL, 0x4966756d6965204b756168, '13.000', 0x6966756d6965206b7561682e6a7067, 'Ifumie Kuah ini kali', NULL),
(12, NULL, 0x4e617369204b756e696e67, '17.000', 0x6e617369206b756e696e672e6a7067, 'Enak lahhh', NULL),
(13, NULL, 0x4d69652041636568, '15.000', 0x6d696520616365682e6a7067, 'Enak ', NULL),
(14, NULL, 0x4e61736920476f72656e67204269617361, '16.000', 0x6e61736920676f72656e672062696173612e6a7067, 'Enak', NULL),
(15, NULL, 0x4e61736920476f72656e67205370657369616c, '16.000', 0x6e61736920676f72656e67207370657369616c2e6a7067, 'Enak', NULL),
(16, NULL, 0x506563656c204c656c65, '56.000', 0x706563656c206c656c652e6a7067, 'Enakkkk', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `pembayaran`
--
CREATE TABLE IF NOT EXISTS `pembayaran` (
`id` int(11) NOT NULL,
`id_user` int(11) DEFAULT NULL,
`total` varchar(10) DEFAULT NULL,
`status` varchar(32) DEFAULT NULL,
`gambar` varchar(64) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `pembayaran`
--
INSERT INTO `pembayaran` (`id`, `id_user`, `total`, `status`, `gambar`) VALUES
(11, 5, '0', NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `pesanan`
--
CREATE TABLE IF NOT EXISTS `pesanan` (
`id` int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`id_menu` int(11) NOT NULL,
`jumlah` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `role`
--
CREATE TABLE IF NOT EXISTS `role` (
`id` int(11) NOT NULL,
`nama` varchar(8) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `role`
--
INSERT INTO `role` (`id`, `nama`) VALUES
(1, 'karyawan'),
(2, 'member');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL,
`first_name` varchar(64) DEFAULT NULL,
`last_name` varchar(64) DEFAULT NULL,
`email` varchar(64) DEFAULT NULL,
`username` varchar(32) DEFAULT NULL,
`password` varchar(32) DEFAULT NULL,
`id_role` varchar(10) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `first_name`, `last_name`, `email`, `username`, `password`, `id_role`) VALUES
(5, 'member', 'member', 'member@yahoo.com', 'member', 'member', '2'),
(6, 'karyawan', 'karyawan', 'karyawan@yahoo.com', 'karyawan', 'karyawan', '1');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `kategori`
--
ALTER TABLE `kategori`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `komentar`
--
ALTER TABLE `komentar`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `menu`
--
ALTER TABLE `menu`
ADD PRIMARY KEY (`id`), ADD KEY `id_karyawan` (`id_karyawan`), ADD KEY `id_kategori` (`id_kategori`);
--
-- Indexes for table `pembayaran`
--
ALTER TABLE `pembayaran`
ADD PRIMARY KEY (`id`), ADD KEY `id_user` (`id_user`);
--
-- Indexes for table `pesanan`
--
ALTER TABLE `pesanan`
ADD PRIMARY KEY (`id`), ADD KEY `id_user` (`id_user`), ADD KEY `pesanan_ibfk_2` (`id_menu`);
--
-- Indexes for table `role`
--
ALTER TABLE `role`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `kategori`
--
ALTER TABLE `kategori`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `komentar`
--
ALTER TABLE `komentar`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `menu`
--
ALTER TABLE `menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `pembayaran`
--
ALTER TABLE `pembayaran`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `pesanan`
--
ALTER TABLE `pesanan`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `role`
--
ALTER TABLE `role`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `menu`
--
ALTER TABLE `menu`
ADD CONSTRAINT `menu_ibfk_1` FOREIGN KEY (`id_karyawan`) REFERENCES `user` (`id`),
ADD CONSTRAINT `menu_ibfk_2` FOREIGN KEY (`id_kategori`) REFERENCES `kategori` (`id`);
--
-- Constraints for table `pembayaran`
--
ALTER TABLE `pembayaran`
ADD CONSTRAINT `pembayaran_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id`);
--
-- Constraints for table `pesanan`
--
ALTER TABLE `pesanan`
ADD CONSTRAINT `pesanan_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id`),
ADD CONSTRAINT `pesanan_ibfk_2` FOREIGN KEY (`id_menu`) REFERENCES `menu` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
......@@ -78,7 +78,7 @@ include_once 'connection/koneksi.php';
$id_barang = $_GET['id'];
$query = mysqli_query($conn, "SELECT * FROM menu WHERE id = '$id_barang'");
$row = mysqli_fetch_array($query);
?>
?><!-- / header -->
<body>
<div class="container">
<div class="row">
......
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