text: -- phpMyAdmin SQL Dump
  -- version 4.8.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: May 10, 2021 at 11:54 AM
  -- Server version: 10.1.33-MariaDB
  -- PHP Version: 7.2.6
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  START TRANSACTION;
  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 utf8mb4 */;
  
  --
  -- Database: `dbrestoran`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tblidentitas`
  --
  
  CREATE TABLE `tblidentitas` (
    `ididentitas` int(11) NOT NULL,
    `nama` varchar(30) NOT NULL,
    `alamat` varchar(30) NOT NULL,
    `telp` varchar(20) NOT NULL,
    `cap1` varchar(30) NOT NULL,
    `cap2` varchar(30) NOT NULL,
    `cap3` varchar(30) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tblidentitas`
  --
  
  INSERT INTO `tblidentitas` (`ididentitas`, `nama`, `alamat`, `telp`, `cap1`, `cap2`, `cap3`) VALUES
  (1, 'KomputerKit.com', 'Sidoarjo', '082333859784', 'Terima Kasih', 'Sudah Makan', 'Direstoran Kami');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tblkategori`
  --
  
  CREATE TABLE `tblkategori` (
    `idkategori` int(11) NOT NULL,
    `kategori` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tblkategori`
  --
  
  INSERT INTO `tblkategori` (`idkategori`, `kategori`) VALUES
  (1, 'Makan'),
  (2, 'Minuman'),
  (3, 'Jajan'),
  (4, 'Oleh - Oleh'),
  (7, 'Rujak'),
  (9, 'Gorengan'),
  (12, 'pisang');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tblmenu`
  --
  
  CREATE TABLE `tblmenu` (
    `idmenu` int(11) NOT NULL,
    `idkategori` int(11) NOT NULL,
    `menu` varchar(100) NOT NULL,
    `gambar` varchar(200) NOT NULL,
    `harga` float NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tblmenu`
  --
  
  INSERT INTO `tblmenu` (`idmenu`, `idkategori`, `menu`, `gambar`, `harga`) VALUES
  (13, 9, 'ote ote', '20200108_041918.png', 20000),
  (14, 12, 'pisang goyeng', 'logo_smkn2_e.png', 5000),
  (15, 4, 'peyek', '6125201.png', 2000),
  (16, 7, 'manis', 'default.jpg', 15000);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tblorder`
  --
  
  CREATE TABLE `tblorder` (
    `idorder` int(11) NOT NULL,
    `idpelanggan` int(11) NOT NULL,
    `tglorder` date NOT NULL,
    `total` float NOT NULL DEFAULT '0',
    `bayar` float NOT NULL DEFAULT '0',
    `kembali` float NOT NULL DEFAULT '0',
    `metode` varchar(50) NOT NULL,
    `status` int(11) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tblorder`
  --
  
  INSERT INTO `tblorder` (`idorder`, `idpelanggan`, `tglorder`, `total`, `bayar`, `kembali`, `metode`, `status`) VALUES
  (1, 30, '2020-04-19', 24000, 0, 0, 'Belum Bayar', 0),
  (2, 30, '2020-04-19', 10000, 20000, 10000, 'Kartu Kredit', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tblorderdetail`
  --
  
  CREATE TABLE `tblorderdetail` (
    `idorderdetail` int(11) NOT NULL,
    `idorder` int(11) NOT NULL,
    `idmenu` int(11) NOT NULL,
    `jumlah` int(11) NOT NULL,
    `hargajual` float NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tblorderdetail`
  --
  
  INSERT INTO `tblorderdetail` (`idorderdetail`, `idorder`, `idmenu`, `jumlah`, `hargajual`) VALUES
  (30, 1, 13, 1, 20000),
  (31, 1, 15, 2, 2000),
  (32, 2, 14, 2, 5000);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tblpelanggan`
  --
  
  CREATE TABLE `tblpelanggan` (
    `idpelanggan` int(11) NOT NULL,
    `pelanggan` varchar(100) NOT NULL,
    `alamat` varchar(200) NOT NULL,
    `telp` varchar(100) NOT NULL,
    `email` varchar(150) NOT NULL,
    `password` varchar(255) NOT NULL,
    `aktif` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tblpelanggan`
  --
  
  INSERT INTO `tblpelanggan` (`idpelanggan`, `pelanggan`, `alamat`, `telp`, `email`, `password`, `aktif`) VALUES
  (30, 'herman', 'demak', '0845', 'herman@gmail.com', '3bf39bf3fe465c0600105b3451f274fa9f05b3c706f022608c0fb28285fe5cbf', 1),
  (31, 'alex', 'aceh', '069', 'alex@gmail.com', '4135aa9dc1b842a653dea846903ddb95bfb8c5a10c504a7fa16e10bc31d1fdf0', 1),
  (34, 'john', 'malang', '021', 'john@gmail.com', '96d9632f363564cc3032521409cf22a852f2032eec099ed5967c0d000cec607a', 1),
  (35, 'poi', 'poi', '0214', 'poi@gmail.com', 'fb07166179b1ce3c49dff4b590c44d66119608be403d9be8c43e7372a997ee75', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbluser`
  --
  
  CREATE TABLE `tbluser` (
    `iduser` int(11) NOT NULL,
    `user` varchar(50) NOT NULL,
    `email` varchar(150) NOT NULL,
    `password` varchar(255) NOT NULL,
    `level` varchar(50) NOT NULL,
    `aktif` int(11) NOT NULL DEFAULT '1'
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tbluser`
  --
  
  INSERT INTO `tbluser` (`iduser`, `user`, `email`, `password`, `level`, `aktif`) VALUES
  (6, 'koki', 'koki@gmail.com', '707c403908e826807640df1bea0ad7674d40b25de50c190bd8aeb5ef00d08055', 'koki', 1),
  (7, 'kasir', 'kasir@gmail.com', '2c7ee7ade401a7cef9ef4dad9978998cf42ed805243d6c91f89408c6097aa571', 'kasir', 1),
  (8, 'admin', 'admin@gmail.com', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', 'admin', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Stand-in structure for view `vmenu`
  -- (See below for the actual view)
  --
  CREATE TABLE `vmenu` (
  `idmenu` int(11)
  ,`idkategori` int(11)
  ,`kategori` varchar(100)
  ,`menu` varchar(100)
  ,`gambar` varchar(200)
  ,`harga` float
  );
  
  -- --------------------------------------------------------
  
  --
  -- Stand-in structure for view `vorder`
  -- (See below for the actual view)
  --
  CREATE TABLE `vorder` (
  `idorder` int(11)
  ,`idpelanggan` int(11)
  ,`tglorder` date
  ,`total` float
  ,`bayar` float
  ,`kembali` float
  ,`metode` varchar(50)
  ,`status` int(11)
  ,`pelanggan` varchar(100)
  ,`alamat` varchar(200)
  ,`telp` varchar(100)
  ,`email` varchar(150)
  ,`password` varchar(255)
  ,`aktif` int(11)
  );
  
  -- --------------------------------------------------------
  
  --
  -- Stand-in structure for view `vorderdetail`
  -- (See below for the actual view)
  --
  CREATE TABLE `vorderdetail` (
  `idorderdetail` int(11)
  ,`idorder` int(11)
  ,`idmenu` int(11)
  ,`jumlah` int(11)
  ,`hargajual` float
  ,`idkategori` int(11)
  ,`menu` varchar(100)
  ,`gambar` varchar(200)
  ,`harga` float
  ,`kategori` varchar(100)
  ,`idpelanggan` int(11)
  ,`tglorder` date
  ,`total` float
  ,`bayar` float
  ,`kembali` float
  ,`metode` varchar(50)
  ,`status` int(11)
  ,`pelanggan` varchar(100)
  ,`alamat` varchar(200)
  ,`telp` varchar(100)
  ,`email` varchar(150)
  ,`password` varchar(255)
  ,`aktif` int(11)
  );
  
  -- --------------------------------------------------------
  
  --
  -- Structure for view `vmenu`
  --
  DROP TABLE IF EXISTS `vmenu`;
  
  CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vmenu`  AS  select `tblmenu`.`idmenu` AS `idmenu`,`tblmenu`.`idkategori` AS `idkategori`,`tblkategori`.`kategori` AS `kategori`,`tblmenu`.`menu` AS `menu`,`tblmenu`.`gambar` AS `gambar`,`tblmenu`.`harga` AS `harga` from (`tblkategori` join `tblmenu` on((`tblkategori`.`idkategori` = `tblmenu`.`idkategori`))) ;
  
  -- --------------------------------------------------------
  
  --
  -- Structure for view `vorder`
  --
  DROP TABLE IF EXISTS `vorder`;
  
  CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vorder`  AS  select `tblorder`.`idorder` AS `idorder`,`tblorder`.`idpelanggan` AS `idpelanggan`,`tblorder`.`tglorder` AS `tglorder`,`tblorder`.`total` AS `total`,`tblorder`.`bayar` AS `bayar`,`tblorder`.`kembali` AS `kembali`,`tblorder`.`metode` AS `metode`,`tblorder`.`status` AS `status`,`tblpelanggan`.`pelanggan` AS `pelanggan`,`tblpelanggan`.`alamat` AS `alamat`,`tblpelanggan`.`telp` AS `telp`,`tblpelanggan`.`email` AS `email`,`tblpelanggan`.`password` AS `password`,`tblpelanggan`.`aktif` AS `aktif` from (`tblpelanggan` join `tblorder` on((`tblpelanggan`.`idpelanggan` = `tblorder`.`idpelanggan`))) ;
  
  -- --------------------------------------------------------
  
  --
  -- Structure for view `vorderdetail`
  --
  DROP TABLE IF EXISTS `vorderdetail`;
  
  CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vorderdetail`  AS  select `tblorderdetail`.`idorderdetail` AS `idorderdetail`,`tblorderdetail`.`idorder` AS `idorder`,`tblorderdetail`.`idmenu` AS `idmenu`,`tblorderdetail`.`jumlah` AS `jumlah`,`tblorderdetail`.`hargajual` AS `hargajual`,`tblmenu`.`idkategori` AS `idkategori`,`tblmenu`.`menu` AS `menu`,`tblmenu`.`gambar` AS `gambar`,`tblmenu`.`harga` AS `harga`,`tblkategori`.`kategori` AS `kategori`,`tblorder`.`idpelanggan` AS `idpelanggan`,`tblorder`.`tglorder` AS `tglorder`,`tblorder`.`total` AS `total`,`tblorder`.`bayar` AS `bayar`,`tblorder`.`kembali` AS `kembali`,`tblorder`.`metode` AS `metode`,`tblorder`.`status` AS `status`,`tblpelanggan`.`pelanggan` AS `pelanggan`,`tblpelanggan`.`alamat` AS `alamat`,`tblpelanggan`.`telp` AS `telp`,`tblpelanggan`.`email` AS `email`,`tblpelanggan`.`password` AS `password`,`tblpelanggan`.`aktif` AS `aktif` from ((((`tblorderdetail` join `tblorder` on((`tblorderdetail`.`idorder` = `tblorder`.`idorder`))) join `tblpelanggan` on((`tblorder`.`idpelanggan` = `tblpelanggan`.`idpelanggan`))) join `tblmenu` on((`tblorderdetail`.`idmenu` = `tblmenu`.`idmenu`))) join `tblkategori` on((`tblmenu`.`idkategori` = `tblkategori`.`idkategori`))) ;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `tblidentitas`
  --
  ALTER TABLE `tblidentitas`
    ADD PRIMARY KEY (`ididentitas`);
  
  --
  -- Indexes for table `tblkategori`
  --
  ALTER TABLE `tblkategori`
    ADD PRIMARY KEY (`idkategori`);
  
  --
  -- Indexes for table `tblmenu`
  --
  ALTER TABLE `tblmenu`
    ADD PRIMARY KEY (`idmenu`);
  
  --
  -- Indexes for table `tblorder`
  --
  ALTER TABLE `tblorder`
    ADD PRIMARY KEY (`idorder`);
  
  --
  -- Indexes for table `tblorderdetail`
  --
  ALTER TABLE `tblorderdetail`
    ADD PRIMARY KEY (`idorderdetail`);
  
  --
  -- Indexes for table `tblpelanggan`
  --
  ALTER TABLE `tblpelanggan`
    ADD PRIMARY KEY (`idpelanggan`);
  
  --
  -- Indexes for table `tbluser`
  --
  ALTER TABLE `tbluser`
    ADD PRIMARY KEY (`iduser`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `tblidentitas`
  --
  ALTER TABLE `tblidentitas`
    MODIFY `ididentitas` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `tblkategori`
  --
  ALTER TABLE `tblkategori`
    MODIFY `idkategori` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
  
  --
  -- AUTO_INCREMENT for table `tblmenu`
  --
  ALTER TABLE `tblmenu`
    MODIFY `idmenu` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
  
  --
  -- AUTO_INCREMENT for table `tblorder`
  --
  ALTER TABLE `tblorder`
    MODIFY `idorder` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `tblorderdetail`
  --
  ALTER TABLE `tblorderdetail`
    MODIFY `idorderdetail` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;
  
  --
  -- AUTO_INCREMENT for table `tblpelanggan`
  --
  ALTER TABLE `tblpelanggan`
    MODIFY `idpelanggan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;
  
  --
  -- AUTO_INCREMENT for table `tbluser`
  --
  ALTER TABLE `tbluser`
    MODIFY `iduser` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  COMMIT;
  
  /*!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 */;
  