-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshop with the item photo.sql
253 lines (215 loc) · 11 KB
/
shop with the item photo.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 12, 2019 at 07:39 AM
-- Server version: 10.3.14-MariaDB
-- PHP Version: 7.3.2
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: `id8527086_shop`
--
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`cID` int(11) NOT NULL,
`cname` varchar(255) NOT NULL,
`description` text NOT NULL,
`parent` int(11) NOT NULL DEFAULT 0,
`ordering` int(11) NOT NULL,
`visibility` tinyint(1) NOT NULL DEFAULT 1,
`allow-comments` tinyint(1) NOT NULL DEFAULT 1,
`allow-ads` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`cID`, `cname`, `description`, `parent`, `ordering`, `visibility`, `allow-comments`, `allow-ads`) VALUES
(1, 'Uncategorized', 'That contains uncategorized items and this is an update content', 0, 0, 1, 1, 1),
(2, 'Gaming', 'This category about PlayStation and its need.', 0, 0, 1, 1, 1),
(3, 'Mobile And Tablets', 'This category about mobile devices.', 0, 2, 1, 1, 1),
(4, 'Music And Movies', 'This contains all the movies and the music for sell', 0, 0, 0, 1, 1),
(5, 'Cameras', 'This contains cameras to sell', 0, 3, 1, 1, 1),
(6, 'Supermarket', 'This contains many things to eat like (food-groceries-oil-vegetable-fruits).', 0, 0, 1, 1, 1),
(7, 'Electronics', 'This contains electronics and computer', 0, 4, 1, 1, 1),
(8, 'LifeStyle', 'This contains clothes and fashion and all things like that', 0, 5, 0, 1, 1),
(9, 'Graphics cards', 'Many Graphics cards', 2, 2, 1, 1, 1),
(11, 'hammers', '', 6, 0, 1, 1, 1),
(12, 'nokia', '', 3, 0, 1, 1, 1),
(13, 'samsung', '', 3, 0, 1, 1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`comment_id` int(11) NOT NULL,
`comment` text NOT NULL,
`added_date` datetime NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT 0,
`item_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`comment_id`, `comment`, `added_date`, `status`, `item_id`, `user_id`) VALUES
(1, 'This is a good product best value for the money', '2018-11-30 17:01:09', 1, 3, 3),
(2, 'this is a good deal with a good item i recommend to buy it', '2018-11-30 15:31:55', 1, 3, 7),
(3, 'this is amazing', '2018-11-07 07:15:20', 1, 1, 7),
(4, 'This is awesome', '2018-12-06 21:25:31', 1, 9, 1),
(5, 'nice !!!', '2019-01-19 19:39:52', 1, 3, 1),
(6, 'This amazing producte this is a great servse', '2019-01-20 16:01:18', 1, 9, 2),
(7, 'this is an amazing deal with a good price', '2019-01-20 19:41:30', 1, 17, 2),
(8, 'oooh, i am ganna buy this', '2019-01-21 01:01:31', 1, 10, 10),
(9, 'hello every one :)))))', '2019-03-13 19:14:03', 1, 1, 18);
-- --------------------------------------------------------
--
-- Table structure for table `items`
--
CREATE TABLE `items` (
`itemID` int(11) NOT NULL,
`itemName` varchar(255) NOT NULL,
`description` text NOT NULL,
`price` varchar(11) NOT NULL,
`uDate` date NOT NULL,
`madeIn` varchar(255) NOT NULL,
`item-img` varchar(255) DEFAULT NULL,
`status` varchar(255) NOT NULL,
`approve` tinyint(1) NOT NULL DEFAULT 0,
`rating` smallint(6) NOT NULL,
`Cat_ID` int(11) NOT NULL DEFAULT 0,
`Member_ID` int(11) NOT NULL,
`tags` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `items`
--
INSERT INTO `items` (`itemID`, `itemName`, `description`, `price`, `uDate`, `madeIn`, `item-img`, `status`, `approve`, `rating`, `Cat_ID`, `Member_ID`, `tags`) VALUES
(1, 'Play station 3 for free (black friday) for 1 hour', 'This is a ps3 for free to enjoy the black friday this is an amazing offer for just 1 hour', '0$', '2018-11-24', 'EG', 'dims.jpg', 'like-new', 1, 0, 2, 1, 'blackfriday,free,friday'),
(3, 'samsung galexy note 8', 'This is a good mobile with good features and a good design', '500$', '2018-11-20', 'US', 's-l1000.jpg', 'new', 1, 0, 3, 2, ''),
(8, 'a good used mobile iphone X for sell', 'this is an iPhone x used for 2 months you can buy it', '200$', '2018-11-30', 'US', 'Apple-iPhoneX-SpaceGray-1-3x.jpg', 'used', 1, 0, 3, 3, ''),
(9, 'Gaming PC for sell', 'This is a high-end gaming pc to play with it is awesome', '50$', '2018-12-03', 'AR', 'Element_Main_1200-gaming-pcs.png', 'new', 1, 0, 2, 7, ''),
(10, 'Samsung mobile phone to sell', 'A good mobile with good performance to sell', '1000$', '2018-12-04', 'FR', 'Samsung-Galaxy-S9-Lilac-Purple-2-3x.jpg', 'new', 1, 0, 3, 6, ''),
(12, 'this is a tested item', 'this item is just for test nothing more than that i love to type on my keyboard it is really awsome how can i describe this feeling hello everyone i am kareem El-giushy salem test test test test test test test', '300$', '2019-01-15', 'AG', '', 'new', 0, 0, 2, 1, ''),
(13, 'blackbarry hammer', 'this is a beautiful hammer with good wood hand made', '100$', '2019-01-19', 'BE', '', 'new', 0, 0, 11, 1, 'hammer,home,equipment,tools,blackfriday'),
(17, 'Ps4 For sale', 'this is a brand new ps4 for sell it is good with a good extra game', '300$', '2019-01-20', 'BN', '5850905cv13d.jpg', 'new', 1, 0, 2, 1, 'gamming,sales,friday,ps4'),
(18, 'sumasung smart tv the newest version', 'This is a wonderful TV', '1000$', '2019-01-20', 'CN', '125944_20190120_193439[1].jpg', 'new', 1, 0, 7, 2, 'tv,smart'),
(19, 'usb adaptor from micro usb to the normal usb', 'This is a cheap small adaptor you can take it anywhere', '1.5$', '2019-01-21', 'BE', 'B8174011_TD01.jpg', 'new', 1, 0, 7, 1, 'cheap,good,quality,dollaritem');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`UserID` int(11) NOT NULL,
`Username` varchar(255) NOT NULL,
`Password` varchar(255) NOT NULL,
`Email` varchar(255) NOT NULL,
`Fullname` varchar(255) NOT NULL,
`Date` date NOT NULL,
`GroupID` int(11) NOT NULL DEFAULT 0,
`Truststatus` int(11) NOT NULL DEFAULT 0,
`Regstatus` int(11) NOT NULL DEFAULT 0,
`profile-img` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`UserID`, `Username`, `Password`, `Email`, `Fullname`, `Date`, `GroupID`, `Truststatus`, `Regstatus`, `profile-img`) VALUES
(1, 'kareem', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '[email protected]', 'Kareem Salem', '2002-07-12', 1, 0, 1, '92985_20180909_165206.jpg'),
(2, 'ahmed', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '[email protected]', 'Ahmed Salem', '2018-10-02', 1, 0, 1, '63646_20180724_150834.jpg'),
(3, 'dina1', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '[email protected]', 'Dina Tahone', '2018-09-11', 0, 0, 0, ''),
(4, 'eman', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '[email protected]', 'Eman El-Sanbouk', '2018-11-01', 0, 0, 0, ''),
(6, 'mohammed', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '[email protected]', 'Mohammed El-Sanbouk', '2018-10-18', 0, 0, 0, ''),
(7, 'ibraheem', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '[email protected]', 'Ibraheem Mamdoh', '2018-10-24', 0, 0, 0, ''),
(8, 'ihab', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '[email protected]', 'Ihab Abde El-Gauad', '2018-11-30', 0, 0, 0, ''),
(9, 'hamada_medo', '40bd001563085fc35165329ea1ff5c5ecbdbbeef', '[email protected]', 'hamada el-sied', '2018-12-07', 0, 0, 0, ''),
(10, 'yaseen.kareem', 'f7c3bc1d808e04732adf679965ccc34ca7ae3441', '[email protected]', 'yaseen kareem', '2019-01-21', 0, 0, 1, ''),
(11, 'sasa', '7c4a8d09ca3762af61e59520943dc26494f8941b', '[email protected]', 'تبتبننب النقملنبن', '2019-01-22', 0, 0, 0, ''),
(12, 'JohnHamza', '7c4a8d09ca3762af61e59520943dc26494f8941b', '[email protected]', 'John Hamza', '2019-01-22', 0, 0, 1, '810446_AirBrush_20181228142219.jpg'),
(13, 'Emanel', '7c4a8d09ca3762af61e59520943dc26494f8941b', '[email protected]', 'Eman El-sanbouk', '2019-01-22', 0, 0, 0, ''),
(14, 'IbraheemMamdooh_3', 'c703af3a56b840535df6eb680ab519abb83766fe', '[email protected]', 'Ibraheem Mamdooh', '2019-01-23', 0, 0, 0, ''),
(15, 'Farag', '7c4a8d09ca3762af61e59520943dc26494f8941b', '[email protected]', 'Farag Mohammed', '2019-01-31', 0, 0, 1, '710798_1548960458281-410853638.jpg'),
(16, 'kemoo.64', '77e57a0282afdb65409d0a602d5701c6945fc19d', '[email protected]', 'kareem salem', '2019-03-11', 0, 0, 0, '156686_art-deco-clipart-1.jpg'),
(17, 'dinaTahoun', 'f7c3bc1d808e04732adf679965ccc34ca7ae3441', '[email protected]', 'dina tahoun', '2019-03-11', 0, 0, 1, '861310_pexels-photo-905163.jpeg'),
(18, 'hema', '7c4a8d09ca3762af61e59520943dc26494f8941b', '[email protected]', 'Ibraheem Qoush', '2019-03-13', 0, 0, 0, '708372_FB_IMG_1535102002686.jpg');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`cID`),
ADD UNIQUE KEY `cname` (`cname`);
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`comment_id`),
ADD KEY `comments_ibfk_2` (`user_id`),
ADD KEY `comments_ibfk_1` (`item_id`);
--
-- Indexes for table `items`
--
ALTER TABLE `items`
ADD PRIMARY KEY (`itemID`),
ADD KEY `Member_ID` (`Member_ID`),
ADD KEY `Cat_ID` (`Cat_ID`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`UserID`),
ADD UNIQUE KEY `Username` (`Username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `cID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `comment_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `items`
--
ALTER TABLE `items`
MODIFY `itemID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `UserID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `items` (`itemID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `items`
--
ALTER TABLE `items`
ADD CONSTRAINT `items_ibfk_1` FOREIGN KEY (`Member_ID`) REFERENCES `users` (`UserID`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `items_ibfk_2` FOREIGN KEY (`Cat_ID`) REFERENCES `categories` (`cID`) 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 */;