text: -- phpMyAdmin SQL Dump
  -- version 4.8.4
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Jul 04, 2019 at 08:52 AM
  -- Server version: 10.1.37-MariaDB
  -- PHP Version: 7.3.0
  
  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: `tokobuah`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `categories`
  --
  
  CREATE TABLE `categories` (
    `category_id` int(11) NOT NULL,
    `category_name` varchar(50) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `categories`
  --
  
  INSERT INTO `categories` (`category_id`, `category_name`) VALUES
  (1, 'Import'),
  (2, 'Local');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `product`
  --
  
  CREATE TABLE `product` (
    `product_code` varchar(10) NOT NULL,
    `product_name` varchar(100) DEFAULT NULL,
    `product_price` double DEFAULT NULL,
    `product_category_id` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `product`
  --
  
  INSERT INTO `product` (`product_code`, `product_name`, `product_price`, `product_category_id`) VALUES
  ('1290381239', 'Mangga Harum Manis', 10000, 2),
  ('4012478102', 'Akebi', 20000, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `tbl_users`
  --
  
  CREATE TABLE `tbl_users` (
    `user_id` int(11) NOT NULL,
    `user_name` varchar(20) DEFAULT NULL,
    `user_email` varchar(60) DEFAULT NULL,
    `user_password` varchar(40) DEFAULT NULL,
    `code` varchar(20) DEFAULT NULL,
    `active` int(1) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `tbl_users`
  --
  
  INSERT INTO `tbl_users` (`user_id`, `user_name`, `user_email`, `user_password`, `code`, `active`) VALUES
  (10, 'daffa', 'daffadalif666@gmail.com', 'fcea920f7412b5da7be0cf42b8c93759', 'TwSHKfiVJBI2', 1),
  (18, 'hacker', 'daffadalif0@gmail.com', 'fcea920f7412b5da7be0cf42b8c93759', 'vWNE1CVDoRZK', 1),
  (21, 'hacker', 'daffadalif777@gmail.com', 'fcea920f7412b5da7be0cf42b8c93759', 'kX6S1sO9CZMj', 1);
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `categories`
  --
  ALTER TABLE `categories`
    ADD PRIMARY KEY (`category_id`);
  
  --
  -- Indexes for table `product`
  --
  ALTER TABLE `product`
    ADD PRIMARY KEY (`product_code`),
    ADD KEY `product_category_id` (`product_category_id`);
  
  --
  -- Indexes for table `tbl_users`
  --
  ALTER TABLE `tbl_users`
    ADD PRIMARY KEY (`user_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `categories`
  --
  ALTER TABLE `categories`
    MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `tbl_users`
  --
  ALTER TABLE `tbl_users`
    MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `product`
  --
  ALTER TABLE `product`
    ADD CONSTRAINT `product_ibfk_1` FOREIGN KEY (`product_category_id`) REFERENCES `categories` (`category_id`) ON UPDATE CASCADE;
  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 */;
  