-
Notifications
You must be signed in to change notification settings - Fork 0
/
project_2.sql
96 lines (78 loc) · 2.89 KB
/
project_2.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 18, 2017 at 07:26 PM
-- Server version: 5.5.46-0ubuntu0.14.04.2
-- PHP Version: 5.5.9-1ubuntu4.20
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: `project_2`
--
-- --------------------------------------------------------
--
-- Table structure for table `cart`
--
CREATE TABLE IF NOT EXISTS `cart` (
`item_id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`image` varchar(200) NOT NULL,
`item_name` varchar(200) NOT NULL,
`price` int(11) NOT NULL,
`category` varchar(200) NOT NULL,
`date` varchar(40) NOT NULL,
PRIMARY KEY (`item_id`),
UNIQUE KEY `item_id` (`item_id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `items`
--
CREATE TABLE IF NOT EXISTS `items` (
`item_id` int(11) NOT NULL AUTO_INCREMENT,
`seller_id` int(11) NOT NULL,
`item_name` varchar(100) NOT NULL,
`description` varchar(200) NOT NULL,
`contact` int(11) NOT NULL,
`choice` varchar(100) NOT NULL,
`price` decimal(65,4) NOT NULL,
`image` varchar(100) NOT NULL,
`date` varchar(100) NOT NULL,
`category` varchar(100) NOT NULL,
`college` varchar(100) NOT NULL,
PRIMARY KEY (`item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `items`
--
INSERT INTO `items` (`item_id`, `seller_id`, `item_name`, `description`, `contact`, `choice`, `price`, `image`, `date`, `category`, `college`) VALUES
(1, 1, 'Bag1', '1 month used school bag', 2147483647, 'donate', '0.0000', 'school-bags-250x250.jpg', 'April 18, 2017', 'bags', 'MNIT Jaipur');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`college` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`gender` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`balance` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `name`, `college`, `email`, `gender`, `password`, `balance`) VALUES
(1, 'Vinayak', 'MNIT Jaipur', 'vishusachdeva228@gmail.com', 'Male', '$2y$10$821jlbF1E1Z5R5LfME7OZuXSmNJ51JPR0QSWoKdIKELMZJBULe6aW', 2000);
/*!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 */;