-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathmobtech.sql
More file actions
261 lines (215 loc) · 8.55 KB
/
Copy pathmobtech.sql
File metadata and controls
261 lines (215 loc) · 8.55 KB
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
254
255
256
257
258
259
260
261
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 06, 2020 at 11:16 PM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.2.16
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: `mobtech`
--
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`cat_id` int(11) NOT NULL,
`cat_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`cat_id`, `cat_name`) VALUES
(1, 'samsung'),
(2, 'realme'),
(3, 'huawei'),
(4, 'xiaomi'),
(5, 'apple');
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`com_id` int(11) NOT NULL,
`comment` varchar(255) NOT NULL,
`comment_user` int(11) NOT NULL,
`comment_post` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`com_id`, `comment`, `comment_user`, `comment_post`) VALUES
(1, 'كم السعر', 4, 2),
(5, 'dsfsfsdf', 1, 12);
-- --------------------------------------------------------
--
-- Table structure for table `mobiles`
--
CREATE TABLE `mobiles` (
`mob_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`screen` varchar(255) NOT NULL,
`screen_protect` varchar(255) NOT NULL,
`screen_res` varchar(255) NOT NULL,
`system` varchar(255) NOT NULL,
`cpu` varchar(255) NOT NULL,
`num_core` varchar(255) NOT NULL,
`gpu` varchar(255) NOT NULL,
`memory` varchar(255) NOT NULL,
`ram` varchar(255) NOT NULL,
`battery` varchar(255) NOT NULL,
`camera_main` varchar(255) NOT NULL,
`camera_feature` varchar(255) NOT NULL,
`camera_video` varchar(255) NOT NULL,
`camera_ultra` varchar(255) NOT NULL DEFAULT 'لا يوجد',
`camera_tele` varchar(255) NOT NULL DEFAULT 'لا يوجد',
`camera_depth` varchar(255) NOT NULL DEFAULT 'لا يوجد',
`camera_micro` varchar(255) NOT NULL DEFAULT 'لا يوجد',
`camera_self` varchar(255) NOT NULL,
`camera_self_feature` varchar(255) NOT NULL,
`camera_self_video` varchar(255) NOT NULL,
`price_eg` varchar(255) NOT NULL DEFAULT 'غير متوفر',
`price_sa` varchar(255) NOT NULL DEFAULT 'غير متوفر',
`price_uae` varchar(255) NOT NULL DEFAULT 'غير متوفر',
`price_jo` varchar(255) NOT NULL DEFAULT 'غير متوفر',
`price_sy` varchar(255) NOT NULL DEFAULT 'غير متوفر',
`price_alg` varchar(255) NOT NULL DEFAULT 'غير متوفر',
`mob_cat` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `mobiles`
--
INSERT INTO `mobiles` (`mob_id`, `name`, `screen`, `screen_protect`, `screen_res`, `system`, `cpu`, `num_core`, `gpu`, `memory`, `ram`, `battery`, `camera_main`, `camera_feature`, `camera_video`, `camera_ultra`, `camera_tele`, `camera_depth`, `camera_micro`, `camera_self`, `camera_self_feature`, `camera_self_video`, `price_eg`, `price_sa`, `price_uae`, `price_jo`, `price_sy`, `price_alg`, `mob_cat`) VALUES
(3, 'Galaxy Z filp', 'Foldable Dynamic AMOLED 6.7 inches', 'لايوجد', '(425 ppi)FullHd', 'Android 10, One UI 2', 'Snapdragon 855+', 'ثماني الانوية', 'Adreno 640', '256GB', '8GB RAM', '3300 MAh', '12 MP, (f/1.8)', ' Dual Pixel PDAF, OIS ,LED flash, HDR panorama', '4K@30/60fps, HDR10+', '12 MP, f/2.2', 'لايوجد', 'لايوجد', 'لايوجد', '10 MP, f/2.4', 'HDR', '4K@30fps', 'eg', 'sa', 'ua', 'jo', 'sy', 'غير متوفر', 1),
(5, 'galaxy s20', '(Dynamic AMOLED) (6.2 inch)(HDR10+)(120Hz)', 'Corning Gorilla Glass 6', '563 ppi density QHD', 'Android 10, One UI 2', 'Snapdragon 865 / Exynos 990', 'ثماني', 'Adreno 650/Mali-G77 MP11', '128GB', '8GB', '(4000 MAh)شحن سريع ولاسلكي', '(12 MP) (f/1.8)', ' Dual Pixel PDAF, OIS', '8K@24fps, 4K@30/60fps \r\nHDR10+, stereo sound rec., gyro-EIS & OIS', '12 MP, f/2.2 (Super Steady video)', '64 MP, f/2.0 (PDAF, OIS, 1.1x optical zoom, 3x hybrid zoom)', 'لا يوجد', 'لا يوجد', '10 MP, f/2.2', 'Dual Pixel PDAF , Dual video call, Auto-HDR', '4K@30/60fps, 1080p@30fps', '1000', '2000', '3000', '4000', '5000', 'غير متوفر', 1),
(7, 'Galaxy S20 Ultra', '(Dynamic AMOLED)(6.9 inches)(HDR10+)', '(Gorilla Glass 6) ,(مقاوم للماء والغبار)', '(QHD)(~511 ppi density)', 'Android 10, One UI 2', 'Snapdragon 865 / Exynos 990', 'ثماني', '(Mali-G77 MP11) /(Adreno 650)', '128GB', '12G', '(Fast charging 45W)\r\n(Fast Qi/PMA wireless charging 15W)', '(108 MP)(f/1.8)', '(PDAF, OIS)(auto-HDR)(panorama)', '8K@24fps, 4K@30/60fps(stereo sound rec., gyro-EIS & OIS)', '(12 MP)(f/2.2)(Super Steady video)', '(48 MP)(f/3.5)( PDAF, OIS, 4x optical zoom, 10x hybrid zoom)', 'لا يوجد', 'لا يوجد', '(40 MP, f/2.2)', '(Dual video call, Auto-HDR)', '4K@30/60fps, 1080p@30fps', 'غير متوفر', 'غير متوفر', 'غير متوفر', 'غير متوفر', 'غير متوفر', 'غير متوفر', 1);
-- --------------------------------------------------------
--
-- Table structure for table `post`
--
CREATE TABLE `post` (
`post_id` int(11) NOT NULL,
`post` varchar(255) NOT NULL,
`post_user` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `post`
--
INSERT INTO `post` (`post_id`, `post`, `post_user`) VALUES
(2, 'السلام عليكم ', 1),
(3, 'جوال s20 للبيع', 5),
(8, 'v', 1),
(9, 'zzz', 1),
(10, 's', 1),
(11, 'fsdf', 1),
(12, 'wael about manza zwfdsf sdf sdf', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `username`, `email`, `password`) VALUES
(1, 'wael', 'wael@gmail.com', 'wael'),
(3, 'basel', 'basel@gmail.com', 'basel'),
(4, 'mohand', 'mohand@gmail.com', 'mohand'),
(5, 'shade', 'shade@gmail.com', 'shade');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`cat_id`);
--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`com_id`),
ADD KEY `comments_ibfk_1` (`comment_post`),
ADD KEY `comments_ibfk_2` (`comment_user`);
--
-- Indexes for table `mobiles`
--
ALTER TABLE `mobiles`
ADD PRIMARY KEY (`mob_id`),
ADD KEY `mobiles` (`mob_cat`);
--
-- Indexes for table `post`
--
ALTER TABLE `post`
ADD PRIMARY KEY (`post_id`),
ADD KEY `post_ibfk_1` (`post_user`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `cat_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `com_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `mobiles`
--
ALTER TABLE `mobiles`
MODIFY `mob_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `post`
--
ALTER TABLE `post`
MODIFY `post_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`comment_post`) REFERENCES `post` (`post_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`comment_user`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `mobiles`
--
ALTER TABLE `mobiles`
ADD CONSTRAINT `mobiles` FOREIGN KEY (`mob_cat`) REFERENCES `categories` (`cat_id`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `post`
--
ALTER TABLE `post`
ADD CONSTRAINT `post_ibfk_1` FOREIGN KEY (`post_user`) REFERENCES `users` (`id`) ON DELETE CASCADE 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 */;