-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathblog.sql
More file actions
205 lines (163 loc) · 7.85 KB
/
blog.sql
File metadata and controls
205 lines (163 loc) · 7.85 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
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 22, 2021 at 04:20 PM
-- Server version: 10.4.21-MariaDB
-- PHP Version: 8.0.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `maindb`
--
-- --------------------------------------------------------
--
-- Table structure for table `admins`
--
CREATE TABLE `admins` (
`logi` varchar(25) NOT NULL,
`pass` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `admins`
--
INSERT INTO `admins` (`logi`, `pass`) VALUES
('admin', 'admin');
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`id` int(3) NOT NULL,
`name` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`id`, `name`) VALUES
(2, 'Programming'),
(3, 'Music'),
(4, 'Dance'),
(6, 'Painting'),
(7, 'People'),
(8, 'Social Media'),
(9, 'Technology');
-- --------------------------------------------------------
--
-- Table structure for table `comments`
--
CREATE TABLE `comments` (
`pid` int(2) NOT NULL,
`comnts` varchar(255) NOT NULL,
`date_posted` datetime NOT NULL,
`name` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `comments`
--
INSERT INTO `comments` (`pid`, `comnts`, `date_posted`, `name`) VALUES
(6, 'hey', '2021-10-17 00:00:00', 'nimesh'),
(8, 'imaryan', '2021-10-17 00:00:00', 'aryan'),
(6, 'aryanagain', '2021-10-17 00:00:00', 'aryan'),
(26, 'hi', '2021-10-21 00:00:00', 'nimesh'),
(6, 'abcd', '2021-10-21 00:00:00', 'nimesh'),
(6, 'great work', '2021-10-21 00:00:00', 'Abhinav'),
(6, 'Amazing content', '2021-10-21 00:00:00', 'Abhinav');
-- --------------------------------------------------------
--
-- Table structure for table `mess`
--
CREATE TABLE `mess` (
`m_id` int(1) NOT NULL,
`who` varchar(25) NOT NULL,
`subject` varchar(25) NOT NULL,
`content` varchar(100) NOT NULL,
`sent_time` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `mess`
--
INSERT INTO `mess` (`m_id`, `who`, `subject`, `content`, `sent_time`) VALUES
(0, 'Coulson', 'Hello', 'Please write a blog on SHIELD if possible. Thanks', '2021-10-21 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `posts`
--
CREATE TABLE `posts` (
`id` int(6) NOT NULL,
`cat_id` int(3) NOT NULL,
`title` varchar(255) NOT NULL,
`contents` text NOT NULL,
`date_posted` datetime NOT NULL,
`upvote` int(11) NOT NULL,
`downvote` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `posts`
--
INSERT INTO `posts` (`id`, `cat_id`, `title`, `contents`, `date_posted`, `upvote`, `downvote`) VALUES
(6, 2, 'What is programming today?', 'Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.\r\nRick Cook, The Wizardry Compiled', '2021-10-06 15:50:31', 8, 2),
(8, 3, 'Music', 'Music has always been a matter of Energy to me, a question of Fuel. Sentimental people call it Inspiration, but what they really mean is Fuel. I have always needed Fuel. I am a serious consumer. On some nights I still believe that a car with the gas needle on empty can run about fifty more miles if you have the right music very loud on the radio.\r\nHunter S. Thompson', '2021-10-06 15:53:36', 6, 5),
(9, 4, 'Just Dance!', 'Work like you don\'t need the money. Love like you\'ve never been hurt. Dance like nobody\'s watching. Satchel Paige', '2021-10-06 15:55:17', 1, 0),
(10, 6, 'Art of Patience', 'I have seen many storms in my life. Most storms have caught me by surprise, so I had to learn very quickly to look further and understand that I am not capable of controlling the weather, to exercise the art of patience and to respect the fury of nature. -Paulo Coelho', '2021-10-06 15:56:16', 0, 0),
(12, 8, 'Social Media vs. Technology', 'Social media is about sociology and psychology more than technology.\r\nBrian Solis', '2021-10-06 15:58:33', 0, 0),
(13, 9, 'Technology!', 'All of the biggest technological inventions created by man - the airplane, the automobile, the computer - says little about his intelligence, but speaks volumes about his laziness. - Mark Kennedy', '2021-10-06 15:59:26', 0, 0),
(27, 2, 'Programming Languages', 'As we know, to communicate with a person, we need a specific language, similarly, to communicate with computers, programmers also need a language is called Programming language.\r\nBefore learning the programming language, let\'s understand what is language?\r\nWhat is Language?\r\nLanguage is a mode of communication that is used to share ideas, opinions with each other. For example, if we want to teach someone, we need a language that is understandable by both communicators.\r\nWhat is a Programming Language?\r\nA programming language is a computer language that is used by programmers (developers) to communicate with computers. It is a set of instructions written in any specific language (C, C++, Java, Python) to perform a specific task.\r\nTypes of programming language\r\n1. Low-level programming language\r\nLow-level language is machine-dependent (0s and 1s) programming language. The processor runs low- level programs directly without the need of a compiler or interpreter, so the programs written in low-level language can be run very fast.\r\n2. High-level programming language\r\nHigh-level programming language (HLL) is designed for developing user-friendly software programs and websites. This programming language requires a compiler or interpreter to translate the program into machine language (execute the program). The main advantage of a high-level language is that it is easy to read, write, and maintain.\r\n3. Middle-level programming language\r\nMiddle-level programming language lies between the low-level programming language and high-level programming language. It is also known as the intermediate programming language and pseudo-language.\r\nA middle-level programming language\'s advantages are that it supports the features of high-level programming, it is a user-friendly language, and closely related to machine language and human language.', '2021-10-21 00:00:00', 0, 0);
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`uid` int(11) NOT NULL,
`name` varchar(25) NOT NULL,
`username` varchar(25) NOT NULL,
`password` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`uid`, `name`, `username`, `password`) VALUES
(0, 'nimesh', 'user', 'user'),
(0, 'aryan', 'poco', 'poco'),
(0, 'Abhinav', 'abhinav', 'pass');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `mess`
--
ALTER TABLE `mess`
ADD PRIMARY KEY (`m_id`);
--
-- Indexes for table `posts`
--
ALTER TABLE `posts`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
MODIFY `id` int(3) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
MODIFY `id` int(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;
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 */;