├── README.md
├── Sql Notes Part 1 & Part 2 marged.pdf
├── Sql Short Notes Part 3.pdf
├── comments.sql
├── facebook_users.sql
├── full database.sql
├── posts.sql
├── products.sql
├── states
├── config.php
├── css
│ ├── normalize.css
│ ├── reset.css
│ └── style.css
├── drink.php
├── image
│ ├── apple-cider.jpeg
│ ├── coffee-milk.jpeg
│ ├── cranberry-juice.jpeg
│ ├── e.txt
│ ├── kool-aid.jpeg
│ ├── lemonade.jpg
│ ├── milk.jpeg
│ ├── moxie.jpeg
│ ├── orange-juice.jpeg
│ ├── pattern1.png
│ ├── tomato-juice.jpeg
│ ├── water.jpeg
│ ├── whiskey.jpeg
│ └── wine.jpeg
├── index.php
└── states.sql
└── users.sql
/README.md:
--------------------------------------------------------------------------------
1 | # SQL-in-30-Days
2 |
3 | *In this repo, we’ll cover everything you need to be proficient enough to comfortably use SQL in your applications or in performing data analysis. And the good news is, there are hardly any prerequisites to get started—you don’t have to have previous coding skills, you just need a computer and I’ll help you get your first database up and running.*
4 |
5 | **In this course you'll learn**
6 |
7 | - How to setup a SQL Database
8 | - Why and when it’s best to use SQL
9 | - How to import and export large datasets
10 | - Over 20 of the basic SQL Commands including SQL SELECT, WHERE, ORDER BY, JOIN and many more!
11 | - How to create a new database and tables from scratch
12 |
--------------------------------------------------------------------------------
/Sql Notes Part 1 & Part 2 marged.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/Sql Notes Part 1 & Part 2 marged.pdf
--------------------------------------------------------------------------------
/Sql Short Notes Part 3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/Sql Short Notes Part 3.pdf
--------------------------------------------------------------------------------
/comments.sql:
--------------------------------------------------------------------------------
1 |
2 |
3 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
4 | SET AUTOCOMMIT = 0;
5 | START TRANSACTION;
6 | SET time_zone = "+00:00";
7 |
8 |
9 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12 | /*!40101 SET NAMES utf8mb4 */;
13 |
14 |
15 | -- --------------------------------------------------------
16 |
17 | --
18 | -- Table structure for table `comments`
19 | --
20 |
21 | CREATE TABLE `comments` (
22 | `ID` int(11) NOT NULL,
23 | `comment_author` varchar(256) NOT NULL,
24 | `comment_author_email` varchar(256) NOT NULL,
25 | `comment_content` longtext NOT NULL
26 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
27 |
28 | --
29 | -- Dumping data for table `comments`
30 | --
31 |
32 | INSERT INTO `comments` (`ID`, `comment_author`, `comment_author_email`, `comment_content`) VALUES
33 | (1, 'jessica', 'jessica@gmail.com', 'Great post! '),
34 | (2, 'mike', 'mike@gmail.com', 'Love it! Write more like this. '),
35 | (3, 'jamie', 'jamie@gmail.com', 'I disagree! '),
36 | (4, 'caleb', 'caleb@gmail.com', 'First');
37 |
38 | --
39 | -- Indexes for dumped tables
40 | --
41 |
42 | --
43 | -- Indexes for table `comments`
44 | --
45 | ALTER TABLE `comments`
46 | ADD PRIMARY KEY (`ID`);
47 |
48 | --
49 | -- AUTO_INCREMENT for dumped tables
50 | --
51 |
52 | --
53 | -- AUTO_INCREMENT for table `comments`
54 | --
55 | ALTER TABLE `comments`
56 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
57 | COMMIT;
58 |
59 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
60 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
61 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
62 |
--------------------------------------------------------------------------------
/facebook_users.sql:
--------------------------------------------------------------------------------
1 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
2 | SET AUTOCOMMIT = 0;
3 | START TRANSACTION;
4 | SET time_zone = "+00:00";
5 |
6 |
7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10 | /*!40101 SET NAMES utf8mb4 */;
11 |
12 | --
13 | -- Database: `db168432_sql`
14 | --
15 |
16 | -- --------------------------------------------------------
17 |
18 | --
19 | -- Table structure for table `facebook_users`
20 | --
21 |
22 | CREATE TABLE `facebook_users` (
23 | `ID` int(11) NOT NULL,
24 | `name` varchar(256) CHARACTER SET utf8 NOT NULL,
25 | `email` varchar(256) CHARACTER SET utf8 NOT NULL,
26 | `password` varchar(256) CHARACTER SET utf8 NOT NULL
27 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
28 |
29 | --
30 | -- Dumping data for table `facebook_users`
31 | --
32 |
33 | INSERT INTO `facebook_users` (`ID`, `name`, `email`, `password`) VALUES
34 | (1, 'chris', 'chris@gmail.com', '1234'),
35 | (3, 'mattan', 'mattan@gmail.com', '1234e41234e41234e41234e41234e4');
36 |
37 | --
38 | -- Indexes for dumped tables
39 | --
40 |
41 | --
42 | -- Indexes for table `facebook_users`
43 | --
44 | ALTER TABLE `facebook_users`
45 | ADD PRIMARY KEY (`ID`);
46 |
47 | --
48 | -- AUTO_INCREMENT for dumped tables
49 | --
50 |
51 | --
52 | -- AUTO_INCREMENT for table `facebook_users`
53 | --
54 | ALTER TABLE `facebook_users`
55 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
56 | COMMIT;
57 |
58 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
59 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
60 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
61 |
--------------------------------------------------------------------------------
/full database.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 4.9.1
3 | -- https://www.phpmyadmin.net/
4 | --
5 | -- Host: internal-db.s168432.gridserver.com
6 | -- Generation Time: Apr 21, 2020 at 08:26 PM
7 | -- Server version: 5.6.34-79.1
8 | -- PHP Version: 7.3.11
9 |
10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11 | SET AUTOCOMMIT = 0;
12 | START TRANSACTION;
13 | SET time_zone = "+00:00";
14 |
15 |
16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
19 | /*!40101 SET NAMES utf8mb4 */;
20 |
21 | --
22 | -- Database: `db168432_sql`
23 | --
24 |
25 | -- --------------------------------------------------------
26 |
27 | --
28 | -- Table structure for table `comments`
29 | --
30 |
31 | CREATE TABLE `comments` (
32 | `ID` int(11) NOT NULL,
33 | `post_id` int(11) DEFAULT NULL,
34 | `comment_author` varchar(256) NOT NULL,
35 | `comment_author_email` varchar(256) NOT NULL,
36 | `comment_content` longtext NOT NULL
37 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
38 |
39 | --
40 | -- Dumping data for table `comments`
41 | --
42 |
43 | INSERT INTO `comments` (`ID`, `post_id`, `comment_author`, `comment_author_email`, `comment_content`) VALUES
44 | (1, 6, 'jessica', 'jessica@gmail.com', 'Great post! '),
45 | (2, 2, 'mike', 'mike@gmail.com', 'Love it! Write more like this. '),
46 | (3, 2, 'jamie', 'jamie@gmail.com', 'I disagree! '),
47 | (4, 2, 'caleb', 'caleb@gmail.com', 'First');
48 |
49 | -- --------------------------------------------------------
50 |
51 | --
52 | -- Table structure for table `facebook_users`
53 | --
54 |
55 | CREATE TABLE `facebook_users` (
56 | `ID` int(11) NOT NULL,
57 | `name` varchar(256) CHARACTER SET utf8 NOT NULL,
58 | `email` varchar(256) CHARACTER SET utf8 NOT NULL,
59 | `password` varchar(256) CHARACTER SET utf8 NOT NULL
60 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
61 |
62 | --
63 | -- Dumping data for table `facebook_users`
64 | --
65 |
66 | INSERT INTO `facebook_users` (`ID`, `name`, `email`, `password`) VALUES
67 | (1, 'chris', 'chris@gmail.com', '1234'),
68 | (3, 'mattan', 'mattan@gmail.com', '1234e41234e41234e41234e41234e4');
69 |
70 | -- --------------------------------------------------------
71 |
72 | --
73 | -- Table structure for table `posts`
74 | --
75 |
76 | CREATE TABLE `posts` (
77 | `ID` int(11) NOT NULL,
78 | `post_author` varchar(255) NOT NULL,
79 | `post_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL,
80 | `post_title` varchar(255) NOT NULL,
81 | `post_status` varchar(255) NOT NULL
82 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
83 |
84 | --
85 | -- Dumping data for table `posts`
86 | --
87 |
88 | INSERT INTO `posts` (`ID`, `post_author`, `post_content`, `post_title`, `post_status`) VALUES
89 | (1, '2', 'What is the toughest part of learning to code?\r\n\r\nSTAYING MOTIVATED.\r\n\r\nBack in 2002, I was a music major with no desire to become a computer programmer. I quit three times. I was still totally determined to make a website for my band ', '6 Reasons Why You’ll Never Learn to Code', 'published'),
90 | (2, '2', 'Python is one of the best coding languages to learn to boost your career. Many of the biggest websites in the world use Python, and there are plenty of jobs you can get with Python skills. But what do you need to know BEFORE you start?\r\n\r\nWith over four years experience teaching Python, we here at One Month have noticed 6 things that all new Python students should know before getting started.', 'What You Need to Know Before You Learn Python', 'published'),
91 | (3, '5', '
On Monday 63 Columbia University MBAs used One Month to build a website in under one hour. Did you know you could build a website from scratch in just one hour?
\r\n\r\n\r\n[caption id=\"attachment_3031\" align=\"alignnone\" width=\"1002\"] MBA students learning to code HTML & CSS[/caption]\r\n
Why are MBAs learning to code?
\r\nMBAs are learning to code because having basic programming skills has become one of the most important skillsets to have when launching a business, hiring, managing and of course when finding job.', '63 MBA Students Learn to Code', 'published'),
92 | (4, '7', '?Joel Califa is a professional problem solver. He\'s a successful designer, developer, team leader, and overall self-proclaimed generalist. His current role is as Senior Product Designer at GitHub. \r\n\r\nA few years ago, Joel Califa', 'How I Got Hired at GitHub', 'draft'),
93 | (5, '4', 'Learning Python has gone mainstream. If you haven', '6 Jobs You Can Land If You Learn Python', 'published'),
94 | (6, '2', 'I’m 100% sure that 100% of you are addicted to the internet, and yet very few of us know where it came from, who made it, or how it works.\r\n\r\nThis piece is part one of my series on the history of the internet. My hope is to show you not only where the internet came from, but in doing so, show you where it wants to go. The US Government developed the early internet as a technology that could survive a nuclear attack.¹\r\n\r\nIf any one computer went down, the hope was that information on the network would persist — there would be no central point of failure, everything would be decentralized.² 50 years later, and decentralization is still the lifeblood of the internet. And so, I think it’s fitting we start there.\r\n\r\n\r\n
Napster was the way I found decentralization.
\r\nI was 19, and music was my symbol of freedom. But music wasn’t free. Albums were very expensive and controlled by a middle-man: the record labels. Each week, I’d go to my local record store, pay $14.99, and return home with a physical album. A CD.', 'The History of The Internet', 'published'),
95 | (7, '5', 'Welcome to the Learn to Code podcast here at One Month. This week on the show, I\'ll be chatting with Meaghan Jones, Lead Support Engineer at Hotjar. \r\n
Meaghan\'s dream was to work remotely in Brazil.
\r\nMeaghan Jones (@meaghanwonder) graduated from UC Berkeley with a Masters in Latin America Studies. Having grown up in California, Meaghan always dreamed of working and living abroad. She loved Latin America, and so \"Latin American Politics\" seemed like her golden ticket to working abroad! ', 'How I Learned to Code in 6 Months', 'draft');
96 |
97 | -- --------------------------------------------------------
98 |
99 | --
100 | -- Table structure for table `products`
101 | --
102 |
103 | CREATE TABLE `products` (
104 | `ID` int(11) NOT NULL,
105 | `book_name` varchar(256) NOT NULL,
106 | `author` varchar(256) NOT NULL,
107 | `price` decimal(10,2) NOT NULL,
108 | `quantity` int(11) NOT NULL
109 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
110 |
111 | --
112 | -- Dumping data for table `products`
113 | --
114 |
115 | INSERT INTO `products` (`ID`, `book_name`, `author`, `price`, `quantity`) VALUES
116 | (1, 'The Overstory', 'Richard Powers', '11.99', 4),
117 | (2, 'Sapiens', 'Yuval Noah Harari', '18.99', 14),
118 | (3, 'Letters to a Young Poet', 'Rainer Marie Rilke', '5.00', 40),
119 | (4, 'Tropic of Cancer (First Edition)', 'Henry Miller', '39.00', 1),
120 | (5, 'Pilot G-Tec-C4 Pens', '', '4.99', 8),
121 | (6, 'Big Magic', 'Elizabeth Gilbert', '12.99', 6),
122 | (7, 'Wild', 'Cheryl Strayed', '11.99', 5),
123 | (8, 'Homo Dues', 'Yuval Noah Harari', '15.99', 5),
124 | (9, 'The Bullet Journal ', 'Ryder Carroll', '19.99', 10),
125 | (10, 'Denial of Death', 'Ernest Becker', '12.99', 6),
126 | (11, 'Harry Potter And The Goblet Of Fire', 'J. K. Rowling', '9.99', 4);
127 |
128 | -- --------------------------------------------------------
129 |
130 | --
131 | -- Table structure for table `purchases`
132 | --
133 |
134 | CREATE TABLE `purchases` (
135 | `ID` int(11) NOT NULL,
136 | `user_id` int(11) NOT NULL,
137 | `product_id` int(11) NOT NULL,
138 | `quantity` int(11) NOT NULL
139 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
140 |
141 | --
142 | -- Dumping data for table `purchases`
143 | --
144 |
145 | INSERT INTO `purchases` (`ID`, `user_id`, `product_id`, `quantity`) VALUES
146 | (1, 2, 2, 1),
147 | (2, 2, 1, 1),
148 | (3, 1, 7, 1),
149 | (4, 3, 9, 1);
150 |
151 | -- --------------------------------------------------------
152 |
153 | --
154 | -- Table structure for table `states`
155 | --
156 |
157 | CREATE TABLE `states` (
158 | `id` int(11) NOT NULL,
159 | `state` varchar(255) NOT NULL,
160 | `drink` varchar(255) NOT NULL,
161 | `year` int(10) NOT NULL,
162 | `image` varchar(256) NOT NULL
163 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
164 |
165 | --
166 | -- Dumping data for table `states`
167 | --
168 |
169 | INSERT INTO `states` (`id`, `state`, `drink`, `year`, `image`) VALUES
170 | (1, 'Alabama', 'Whiskey', 2004, 'whiskey.jpeg'),
171 | (2, 'Arizona', 'Lemonade', 2019, 'lemonade.jpg'),
172 | (5, 'Arkansas', 'Milk', 1985, 'milk.jpeg'),
173 | (6, 'Delaware', 'Chocolate Oat Milk', 1983, 'milk.jpeg'),
174 | (8, 'Indiana', 'Water', 2007, 'water.jpeg'),
175 | (9, 'Kentucky', 'Milk', 2005, 'milk.jpeg'),
176 | (10, 'Louisiana', 'Milk', 1983, 'milk.jpeg'),
177 | (11, 'Maine', 'Moxie', 2005, 'moxie.jpeg'),
178 | (12, 'Maryland', 'Milk', 1998, 'milk.jpeg'),
179 | (13, 'Massachusetts', 'Cranberry Juice', 1970, 'cranberry-juice.jpeg'),
180 | (14, 'Minnesota', 'Milk', 1984, 'milk.jpeg'),
181 | (15, 'Mississippi', 'Milk', 1984, 'milk.jpeg'),
182 | (16, 'Nebraska', 'Kool-Aid', 1998, 'kool-aid.jpeg'),
183 | (17, 'New Hampshire', 'Apple Cider', 2010, 'apple-cider.jpeg'),
184 | (18, 'New York', 'Milk', 1981, 'milk.jpeg'),
185 | (19, 'North Carolina', 'Milk', 1987, 'milk.jpeg'),
186 | (20, 'North Dakota', 'Milk', 1983, 'milk.jpeg'),
187 | (21, 'Ohio', 'Tomato Juice', 1965, 'tomato-juice.jpeg'),
188 | (22, 'Oklahoma', 'Milk', 2002, 'milk.jpeg'),
189 | (23, 'Oregon', 'Milk', 1997, 'milk.jpeg'),
190 | (24, 'Pennsylvania', 'Milk', 1982, 'milk.jpeg'),
191 | (25, 'Rhode Island', 'Coffee Milk', 1993, 'coffee-milk.jpeg'),
192 | (26, 'South Carolina', 'Milk', 1984, 'milk.jpeg'),
193 | (27, 'South Dakota', 'Milk', 1986, 'milk.jpeg'),
194 | (28, 'Tennessee', 'Milk', 2009, 'milk.jpeg'),
195 | (29, 'Vermont', 'Milk', 1983, 'milk.jpeg'),
196 | (30, 'Virginia', 'Milk', 1982, 'milk.jpeg'),
197 | (31, 'Wisconsin ', 'Milk', 1987, 'milk.jpeg'),
198 | (32, 'New Jersey', 'Vodka', 2018, 'vodka.jpg'),
199 | (33, 'California', 'Wine', 1950, '');
200 |
201 | -- --------------------------------------------------------
202 |
203 | --
204 | -- Table structure for table `users`
205 | --
206 |
207 | CREATE TABLE `users` (
208 | `ID` bigint(20) UNSIGNED NOT NULL,
209 | `user_login` varchar(60) COLLATE utf8mb4_unicode_520_ci NOT NULL,
210 | `user_pass` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL,
211 | `user_nicename` varchar(50) COLLATE utf8mb4_unicode_520_ci NOT NULL,
212 | `user_email` varchar(100) COLLATE utf8mb4_unicode_520_ci NOT NULL
213 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
214 |
215 | --
216 | -- Dumping data for table `users`
217 | --
218 |
219 | INSERT INTO `users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`) VALUES
220 | (1, 'jsmith', '0832c1202da8d382318e329a7c133ea0', 'jared', 'jsmith@gmail.com'),
221 | (2, 'castig', '$P$Bq.VlkwuWFu4BIktX.olT2eyCVwXv1.', 'chris', 'chris@gmail.com'),
222 | (3, 'mattan', '5f4dcc3b5aa765d61d8327deb882cf99', 'mattan', 'mattan@gmail.com'),
223 | (4, 'zuck', 'f9cQUpQ34BIVlkkt', 'mark', 'zuck@gmail.com'),
224 | (5, 'jamie', 'lH0WC8yboMj/bjt4f3Km/', 'jamie', 'jamie@gmail.com'),
225 | (6, 'wei', '$P$B20YTQ5OHff9cQUpQ4fKNBecfZnYGy.', 'wei', 'wei@gmail.com'),
226 | (7, 'caraadams', 'A7Cx1zD7cbeCWaAOUu/eYyiRU1', 'cara', 'caraadams@gmail.com'),
227 | (8, 'ophir', '$P$B0YwbF0r8r7CHEq/yzhRoc6BolpKeD.', 'ophir', 'ophir@hotmail.com');
228 |
229 | --
230 | -- Indexes for dumped tables
231 | --
232 |
233 | --
234 | -- Indexes for table `comments`
235 | --
236 | ALTER TABLE `comments`
237 | ADD PRIMARY KEY (`ID`);
238 |
239 | --
240 | -- Indexes for table `facebook_users`
241 | --
242 | ALTER TABLE `facebook_users`
243 | ADD PRIMARY KEY (`ID`);
244 |
245 | --
246 | -- Indexes for table `posts`
247 | --
248 | ALTER TABLE `posts`
249 | ADD PRIMARY KEY (`ID`);
250 |
251 | --
252 | -- Indexes for table `products`
253 | --
254 | ALTER TABLE `products`
255 | ADD PRIMARY KEY (`ID`);
256 |
257 | --
258 | -- Indexes for table `purchases`
259 | --
260 | ALTER TABLE `purchases`
261 | ADD PRIMARY KEY (`ID`);
262 |
263 | --
264 | -- Indexes for table `states`
265 | --
266 | ALTER TABLE `states`
267 | ADD PRIMARY KEY (`id`);
268 |
269 | --
270 | -- Indexes for table `users`
271 | --
272 | ALTER TABLE `users`
273 | ADD PRIMARY KEY (`ID`),
274 | ADD KEY `user_login_key` (`user_login`),
275 | ADD KEY `user_nicename` (`user_nicename`),
276 | ADD KEY `user_email` (`user_email`);
277 |
278 | --
279 | -- AUTO_INCREMENT for dumped tables
280 | --
281 |
282 | --
283 | -- AUTO_INCREMENT for table `comments`
284 | --
285 | ALTER TABLE `comments`
286 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
287 |
288 | --
289 | -- AUTO_INCREMENT for table `facebook_users`
290 | --
291 | ALTER TABLE `facebook_users`
292 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
293 |
294 | --
295 | -- AUTO_INCREMENT for table `posts`
296 | --
297 | ALTER TABLE `posts`
298 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
299 |
300 | --
301 | -- AUTO_INCREMENT for table `products`
302 | --
303 | ALTER TABLE `products`
304 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
305 |
306 | --
307 | -- AUTO_INCREMENT for table `purchases`
308 | --
309 | ALTER TABLE `purchases`
310 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
311 |
312 | --
313 | -- AUTO_INCREMENT for table `states`
314 | --
315 | ALTER TABLE `states`
316 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;
317 |
318 | --
319 | -- AUTO_INCREMENT for table `users`
320 | --
321 | ALTER TABLE `users`
322 | MODIFY `ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
323 | COMMIT;
324 |
325 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
326 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
327 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
328 |
--------------------------------------------------------------------------------
/posts.sql:
--------------------------------------------------------------------------------
1 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
2 | SET AUTOCOMMIT = 0;
3 | START TRANSACTION;
4 | SET time_zone = "+00:00";
5 |
6 |
7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10 | /*!40101 SET NAMES utf8mb4 */;
11 |
12 | -- --------------------------------------------------------
13 |
14 | --
15 | -- Table structure for table `posts`
16 | --
17 |
18 | CREATE TABLE `posts` (
19 | `ID` int(11) NOT NULL,
20 | `post_author` varchar(255) NOT NULL,
21 | `post_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL,
22 | `post_title` varchar(255) NOT NULL,
23 | `post_status` varchar(255) NOT NULL
24 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
25 |
26 | --
27 | -- Dumping data for table `posts`
28 | --
29 |
30 | INSERT INTO `posts` (`ID`, `post_author`, `post_content`, `post_title`, `post_status`) VALUES
31 | (1, '2', 'What is the toughest part of learning to code?\r\n\r\nSTAYING MOTIVATED.\r\n\r\nBack in 2002, I was a music major with no desire to become a computer programmer. I quit three times. I was still totally determined to make a website for my band ', '6 Reasons Why You’ll Never Learn to Code', 'published'),
32 | (2, '2', 'Python is one of the best coding languages to learn to boost your career. Many of the biggest websites in the world use Python, and there are plenty of jobs you can get with Python skills. But what do you need to know BEFORE you start?\r\n\r\nWith over four years experience teaching Python, we here at One Month have noticed 6 things that all new Python students should know before getting started.', 'What You Need to Know Before You Learn Python', 'published'),
33 | (3, '5', '
On Monday 63 Columbia University MBAs used One Month to build a website in under one hour. Did you know you could build a website from scratch in just one hour?
\r\n\r\n\r\n[caption id=\"attachment_3031\" align=\"alignnone\" width=\"1002\"] MBA students learning to code HTML & CSS[/caption]\r\n
Why are MBAs learning to code?
\r\nMBAs are learning to code because having basic programming skills has become one of the most important skillsets to have when launching a business, hiring, managing and of course when finding job.', '63 MBA Students Learn to Code', 'published'),
34 | (4, '7', '?Joel Califa is a professional problem solver. He\'s a successful designer, developer, team leader, and overall self-proclaimed generalist. His current role is as Senior Product Designer at GitHub. \r\n\r\nA few years ago, Joel Califa', 'How I Got Hired at GitHub', 'draft'),
35 | (5, '4', 'Learning Python has gone mainstream. If you haven', '6 Jobs You Can Land If You Learn Python', 'published'),
36 | (6, '2', 'I’m 100% sure that 100% of you are addicted to the internet, and yet very few of us know where it came from, who made it, or how it works.\r\n\r\nThis piece is part one of my series on the history of the internet. My hope is to show you not only where the internet came from, but in doing so, show you where it wants to go. The US Government developed the early internet as a technology that could survive a nuclear attack.¹\r\n\r\nIf any one computer went down, the hope was that information on the network would persist — there would be no central point of failure, everything would be decentralized.² 50 years later, and decentralization is still the lifeblood of the internet. And so, I think it’s fitting we start there.\r\n\r\n\r\n
Napster was the way I found decentralization.
\r\nI was 19, and music was my symbol of freedom. But music wasn’t free. Albums were very expensive and controlled by a middle-man: the record labels. Each week, I’d go to my local record store, pay $14.99, and return home with a physical album. A CD.', 'The History of The Internet', 'published'),
37 | (7, '5', 'Welcome to the Learn to Code podcast here at One Month. This week on the show, I\'ll be chatting with Meaghan Jones, Lead Support Engineer at Hotjar. \r\n
30 |
31 | fetch_array(MYSQLI_BOTH)) {
34 |
35 | // Print out the contents of each row into a table
36 | // Start by printing out the name of each "state" between
tags
37 | echo "
" . $row['state'] . "
";
38 |
39 | // Then we make an image tag with HTML and inert the "image" link
40 | echo "";
41 |
42 | }
43 | ?>
44 |
45 |
46 |
31 |
32 | fetch_array(MYSQLI_BOTH)) {
35 |
36 | // Print out the contents of each row into a table
37 | // Start by printing out the name of each "state" between
tags
38 | echo "
" . $row['state'] . "
";
39 |
40 | // Then we make an image tag with HTML and inert the "image" link
41 | //echo "";
42 |
43 | echo "";
44 | }
45 | ?>
46 |
47 |
48 |