Giter VIP home page Giter VIP logo

php-web-shop-documentation-'s Introduction

web-shop

-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/

-- Host: 127.0.0.1 -- Generation Time: Nov 19, 2018 at 03:25 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3

SET FOREIGN_KEY_CHECKS=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: lab_webshop

CREATE DATABASE IF NOT EXISTS lab_webshop DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE lab_webshop;


-- -- Table structure for table tbl_basket

CREATE TABLE tbl_basket ( id int(11) NOT NULL, id_item int(11) NOT NULL, quantity int(11) NOT NULL, id_cookie int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


-- -- Table structure for table tbl_cookie

CREATE TABLE tbl_cookie ( id int(11) NOT NULL, cookie_user varchar(200) NOT NULL, id_user int(11) NOT NULL, logged_in tinyint(1) NOT NULL, expiration_date datetime NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


-- -- Table structure for table tbl_items

CREATE TABLE tbl_items ( id int(11) NOT NULL, title varchar(100) NOT NULL, price int(11) NOT NULL, description varchar(100) NOT NULL, stock int(11) NOT NULL, image varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


-- -- Table structure for table tbl_orders

CREATE TABLE tbl_orders ( id int(11) NOT NULL, quantity int(11) NOT NULL, price int(11) NOT NULL, id_item int(11) NOT NULL, id_user int(11) NOT NULL, order_date datetime NOT NULL, total_price int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;


-- -- Table structure for table tbl_user

CREATE TABLE tbl_user ( id int(11) NOT NULL, name varchar(100) NOT NULL, address varchar(100) NOT NULL, phone varchar(100) NOT NULL, email varchar(100) NOT NULL, password varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- -- Indexes for dumped tables

-- -- Indexes for table tbl_basket

ALTER TABLE tbl_basket ADD PRIMARY KEY (id), ADD KEY id_cookie (id_cookie);

-- -- Indexes for table tbl_cookie

ALTER TABLE tbl_cookie ADD PRIMARY KEY (id), ADD KEY id_user (id_user);

-- -- Indexes for table tbl_items

ALTER TABLE tbl_items ADD PRIMARY KEY (id);

-- -- Indexes for table tbl_orders

ALTER TABLE tbl_orders ADD PRIMARY KEY (id), ADD KEY id_item (id_item), ADD KEY tbl_orders_ibfk_1 (id_user);

-- -- Indexes for table tbl_user

ALTER TABLE tbl_user ADD PRIMARY KEY (id);

-- -- AUTO_INCREMENT for dumped tables

-- -- AUTO_INCREMENT for table tbl_basket

ALTER TABLE tbl_basket MODIFY id int(11) NOT NULL AUTO_INCREMENT;

-- -- AUTO_INCREMENT for table tbl_cookie

ALTER TABLE tbl_cookie MODIFY id int(11) NOT NULL AUTO_INCREMENT;

-- -- AUTO_INCREMENT for table tbl_items

ALTER TABLE tbl_items MODIFY id int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

-- -- AUTO_INCREMENT for table tbl_orders

ALTER TABLE tbl_orders MODIFY id int(11) NOT NULL AUTO_INCREMENT;

-- -- AUTO_INCREMENT for table tbl_user

ALTER TABLE tbl_user MODIFY id int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

-- -- Constraints for dumped tables

-- -- Constraints for table tbl_basket

ALTER TABLE tbl_basket ADD CONSTRAINT tbl_basket_ibfk_1 FOREIGN KEY (id_cookie) REFERENCES tbl_cookie (id);

-- -- Constraints for table tbl_cookie

ALTER TABLE tbl_cookie ADD CONSTRAINT tbl_cookie_ibfk_1 FOREIGN KEY (id_user) REFERENCES tbl_user (id);

-- -- Constraints for table tbl_orders

ALTER TABLE tbl_orders ADD CONSTRAINT tbl_orders_ibfk_1 FOREIGN KEY (id_user) REFERENCES tbl_user (id); SET FOREIGN_KEY_CHECKS=1; 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 */;

php-web-shop-documentation-'s People

Contributors

karkixitiz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.