├── 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 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', '\"PythonLearning 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 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', '\"PythonLearning 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

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'); 38 | 39 | -- 40 | -- Indexes for dumped tables 41 | -- 42 | 43 | -- 44 | -- Indexes for table `posts` 45 | -- 46 | ALTER TABLE `posts` 47 | ADD PRIMARY KEY (`ID`); 48 | 49 | -- 50 | -- AUTO_INCREMENT for dumped tables 51 | -- 52 | 53 | -- 54 | -- AUTO_INCREMENT for table `posts` 55 | -- 56 | ALTER TABLE `posts` 57 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; 58 | COMMIT; 59 | 60 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 61 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 62 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 63 | -------------------------------------------------------------------------------- /products.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 | -- 16 | -- Table structure for table `products` 17 | -- 18 | 19 | CREATE TABLE `products` ( 20 | `ID` int(11) NOT NULL, 21 | `book_name` varchar(256) NOT NULL, 22 | `author` varchar(256) NOT NULL, 23 | `price` decimal(10,2) NOT NULL, 24 | `quantity` int(11) NOT NULL 25 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 26 | 27 | -- 28 | -- Dumping data for table `products` 29 | -- 30 | 31 | INSERT INTO `products` (`ID`, `book_name`, `author`, `price`, `quantity`) VALUES 32 | (1, 'The Overstory', 'Richard Powers', '11.99', 4), 33 | (2, 'Sapiens', 'Yuval Noah Harari', '18.99', 14), 34 | (3, 'Letters to a Young Poet', 'Rainer Marie Rilke', '5.00', 40), 35 | (4, 'Tropic of Cancer (First Edition)', 'Henry Miller', '39.00', 1), 36 | (5, 'Pilot G-Tec-C4 Pens', '', '4.99', 8), 37 | (6, 'Big Magic', 'Elizabeth Gilbert', '12.99', 6), 38 | (7, 'Wild', 'Cheryl Strayed', '11.99', 5), 39 | (8, 'Homo Dues', 'Yuval Noah Harari', '15.99', 5), 40 | (9, 'The Bullet Journal ', 'Ryder Carroll', '19.99', 10), 41 | (10, 'Denial of Death', 'Ernest Becker', '12.99', 6), 42 | (11, 'Harry Potter And The Goblet Of Fire', 'J. K. Rowling', '9.99', 4); 43 | 44 | -- 45 | -- Indexes for dumped tables 46 | -- 47 | 48 | -- 49 | -- Indexes for table `products` 50 | -- 51 | ALTER TABLE `products` 52 | ADD PRIMARY KEY (`ID`); 53 | 54 | -- 55 | -- AUTO_INCREMENT for dumped tables 56 | -- 57 | 58 | -- 59 | -- AUTO_INCREMENT for table `products` 60 | -- 61 | ALTER TABLE `products` 62 | MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; 63 | COMMIT; 64 | 65 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 66 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 67 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 68 | -------------------------------------------------------------------------------- /states/config.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /states/css/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css 2012-07-07T09:50 UTC - http://github.com/necolas/normalize.css */ 2 | 3 | /* ========================================================================== 4 | HTML5 display definitions 5 | ========================================================================== */ 6 | 7 | /* 8 | * Corrects `block` display not defined in IE6/7/8/9 & FF3. 9 | */ 10 | 11 | article, 12 | aside, 13 | details, 14 | figcaption, 15 | figure, 16 | footer, 17 | header, 18 | hgroup, 19 | nav, 20 | section, 21 | summary { 22 | display: block; 23 | } 24 | 25 | /* 26 | * Corrects `inline-block` display not defined in IE6/7/8/9 & FF3. 27 | */ 28 | 29 | audio, 30 | canvas, 31 | video { 32 | display: inline-block; 33 | *display: inline; 34 | *zoom: 1; 35 | } 36 | 37 | /* 38 | * Prevents modern browsers from displaying `audio` without controls. 39 | * Remove excess height in iOS5 devices. 40 | */ 41 | 42 | audio:not([controls]) { 43 | display: none; 44 | height: 0; 45 | } 46 | 47 | /* 48 | * Addresses styling for `hidden` attribute not present in IE7/8/9, FF3, S4. 49 | * Known issue: no IE6 support. 50 | */ 51 | 52 | [hidden] { 53 | display: none; 54 | } 55 | 56 | /* ========================================================================== 57 | Base 58 | ========================================================================== */ 59 | 60 | /* 61 | * 1. Corrects text resizing oddly in IE6/7 when body `font-size` is set using 62 | * `em` units. 63 | * 2. Prevents iOS text size adjust after orientation change, without disabling 64 | * user zoom. 65 | */ 66 | 67 | html { 68 | font-size: 100%; /* 1 */ 69 | -webkit-text-size-adjust: 100%; /* 2 */ 70 | -ms-text-size-adjust: 100%; /* 2 */ 71 | } 72 | 73 | /* 74 | * Addresses `font-family` inconsistency between `textarea` and other form 75 | * elements. 76 | */ 77 | 78 | html, 79 | button, 80 | input, 81 | select, 82 | textarea { 83 | font-family: sans-serif; 84 | } 85 | 86 | /* 87 | * Addresses margins handled incorrectly in IE6/7. 88 | */ 89 | 90 | body { 91 | margin: 0; 92 | } 93 | 94 | /* ========================================================================== 95 | Links 96 | ========================================================================== */ 97 | 98 | /* 99 | * Addresses `outline` inconsistency between Chrome and other browsers. 100 | */ 101 | 102 | a:focus { 103 | outline: thin dotted; 104 | } 105 | 106 | /* 107 | * Improves readability when focused and also mouse hovered in all browsers. 108 | * people.opera.com/patrickl/experiments/keyboard/test 109 | */ 110 | 111 | a:active, 112 | a:hover { 113 | outline: 0; 114 | } 115 | 116 | /* ========================================================================== 117 | Typography 118 | ========================================================================== */ 119 | 120 | /* 121 | * Addresses font sizes and margins set differently in IE6/7. 122 | * Addresses font sizes within `section` and `article` in FF4+, Chrome, S5. 123 | */ 124 | 125 | h1 { 126 | font-size: 2em; 127 | margin: 0.67em 0; 128 | } 129 | 130 | h2 { 131 | font-size: 1.5em; 132 | margin: 0.83em 0; 133 | } 134 | 135 | h3 { 136 | font-size: 1.17em; 137 | margin: 1em 0; 138 | } 139 | 140 | h4 { 141 | font-size: 1em; 142 | margin: 1.33em 0; 143 | } 144 | 145 | h5 { 146 | font-size: 0.83em; 147 | margin: 1.67em 0; 148 | } 149 | 150 | h6 { 151 | font-size: 0.75em; 152 | margin: 2.33em 0; 153 | } 154 | 155 | /* 156 | * Addresses styling not present in IE7/8/9, S5, Chrome. 157 | */ 158 | 159 | abbr[title] { 160 | border-bottom: 1px dotted; 161 | } 162 | 163 | /* 164 | * Addresses style set to `bolder` in FF3+, S4/5, Chrome. 165 | */ 166 | 167 | b, 168 | strong { 169 | font-weight: bold; 170 | } 171 | 172 | blockquote { 173 | margin: 1em 40px; 174 | } 175 | 176 | /* 177 | * Addresses styling not present in S5, Chrome. 178 | */ 179 | 180 | dfn { 181 | font-style: italic; 182 | } 183 | 184 | /* 185 | * Addresses styling not present in IE6/7/8/9. 186 | */ 187 | 188 | mark { 189 | background: #ff0; 190 | color: #000; 191 | } 192 | 193 | /* 194 | * Addresses margins set differently in IE6/7. 195 | */ 196 | 197 | p, 198 | pre { 199 | margin: 1em 0; 200 | } 201 | 202 | /* 203 | * Corrects font family set oddly in IE6, S4/5, Chrome. 204 | * en.wikipedia.org/wiki/User:Davidgothberg/Test59 205 | */ 206 | 207 | code, 208 | kbd, 209 | pre, 210 | samp { 211 | font-family: monospace, serif; 212 | _font-family: 'courier new', monospace; 213 | font-size: 1em; 214 | } 215 | 216 | /* 217 | * Improves readability of pre-formatted text in all browsers. 218 | */ 219 | 220 | pre { 221 | white-space: pre; 222 | white-space: pre-wrap; 223 | word-wrap: break-word; 224 | } 225 | 226 | /* 227 | * Addresses CSS quotes not supported in IE6/7. 228 | */ 229 | 230 | q { 231 | quotes: none; 232 | } 233 | 234 | /* 235 | * Addresses `quotes` property not supported in S4. 236 | */ 237 | 238 | q:before, 239 | q:after { 240 | content: ''; 241 | content: none; 242 | } 243 | 244 | small { 245 | font-size: 75%; 246 | } 247 | 248 | /* 249 | * Prevents `sub` and `sup` affecting `line-height` in all browsers. 250 | * gist.github.com/413930 251 | */ 252 | 253 | sub, 254 | sup { 255 | font-size: 75%; 256 | line-height: 0; 257 | position: relative; 258 | vertical-align: baseline; 259 | } 260 | 261 | sup { 262 | top: -0.5em; 263 | } 264 | 265 | sub { 266 | bottom: -0.25em; 267 | } 268 | 269 | /* ========================================================================== 270 | Lists 271 | ========================================================================== */ 272 | 273 | /* 274 | * Addresses margins set differently in IE6/7. 275 | */ 276 | 277 | dl, 278 | menu, 279 | ol, 280 | ul { 281 | margin: 1em 0; 282 | } 283 | 284 | dd { 285 | margin: 0 0 0 40px; 286 | } 287 | 288 | /* 289 | * Addresses paddings set differently in IE6/7. 290 | */ 291 | 292 | menu, 293 | ol, 294 | ul { 295 | padding: 0 0 0 40px; 296 | } 297 | 298 | /* 299 | * Corrects list images handled incorrectly in IE7. 300 | */ 301 | 302 | nav ul, 303 | nav ol { 304 | list-style: none; 305 | list-style-image: none; 306 | } 307 | 308 | /* ========================================================================== 309 | Embedded content 310 | ========================================================================== */ 311 | 312 | /* 313 | * 1. Removes border when inside `a` element in IE6/7/8/9, FF3. 314 | * 2. Improves image quality when scaled in IE7. 315 | * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ 316 | */ 317 | 318 | img { 319 | border: 0; /* 1 */ 320 | -ms-interpolation-mode: bicubic; /* 2 */ 321 | } 322 | 323 | /* 324 | * Corrects overflow displayed oddly in IE9. 325 | */ 326 | 327 | svg:not(:root) { 328 | overflow: hidden; 329 | } 330 | 331 | /* ========================================================================== 332 | Figures 333 | ========================================================================== */ 334 | 335 | /* 336 | * Addresses margin not present in IE6/7/8/9, S5, O11. 337 | */ 338 | 339 | figure { 340 | margin: 0; 341 | } 342 | 343 | /* ========================================================================== 344 | Forms 345 | ========================================================================== */ 346 | 347 | /* 348 | * Corrects margin displayed oddly in IE6/7. 349 | */ 350 | 351 | form { 352 | margin: 0; 353 | } 354 | 355 | /* 356 | * Define consistent border, margin, and padding. 357 | */ 358 | 359 | fieldset { 360 | border: 1px solid #c0c0c0; 361 | margin: 0 2px; 362 | padding: 0.35em 0.625em 0.75em; 363 | } 364 | 365 | /* 366 | * 1. Corrects color not being inherited in IE6/7/8/9. 367 | * 2. Corrects text not wrapping in FF3. 368 | * 3. Corrects alignment displayed oddly in IE6/7. 369 | */ 370 | 371 | legend { 372 | border: 0; /* 1 */ 373 | padding: 0; 374 | white-space: normal; /* 2 */ 375 | *margin-left: -7px; /* 3 */ 376 | } 377 | 378 | /* 379 | * 1. Corrects font size not being inherited in all browsers. 380 | * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome. 381 | * 3. Improves appearance and consistency in all browsers. 382 | */ 383 | 384 | button, 385 | input, 386 | select, 387 | textarea { 388 | font-size: 100%; /* 1 */ 389 | margin: 0; /* 2 */ 390 | vertical-align: baseline; /* 3 */ 391 | *vertical-align: middle; /* 3 */ 392 | } 393 | 394 | /* 395 | * Addresses FF3/4 setting `line-height` on `input` using `!important` in the 396 | * UA stylesheet. 397 | */ 398 | 399 | button, 400 | input { 401 | line-height: normal; 402 | } 403 | 404 | /* 405 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 406 | * and `video` controls. 407 | * 2. Corrects inability to style clickable `input` types in iOS. 408 | * 3. Improves usability and consistency of cursor style between image-type 409 | * `input` and others. 410 | * 4. Removes inner spacing in IE7 without affecting normal text inputs. 411 | * Known issue: inner spacing remains in IE6. 412 | */ 413 | 414 | button, 415 | html input[type="button"], /* 1 */ 416 | input[type="reset"], 417 | input[type="submit"] { 418 | -webkit-appearance: button; /* 2 */ 419 | cursor: pointer; /* 3 */ 420 | *overflow: visible; /* 4 */ 421 | } 422 | 423 | /* 424 | * Re-set default cursor for disabled elements. 425 | */ 426 | 427 | button[disabled], 428 | input[disabled] { 429 | cursor: default; 430 | } 431 | 432 | /* 433 | * 1. Addresses box sizing set to content-box in IE8/9. 434 | * 2. Removes excess padding in IE8/9. 435 | * 3. Removes excess padding in IE7. 436 | * Known issue: excess padding remains in IE6. 437 | */ 438 | 439 | input[type="checkbox"], 440 | input[type="radio"] { 441 | box-sizing: border-box; /* 1 */ 442 | padding: 0; /* 2 */ 443 | *height: 13px; /* 3 */ 444 | *width: 13px; /* 3 */ 445 | } 446 | 447 | /* 448 | * 1. Addresses `appearance` set to `searchfield` in S5, Chrome. 449 | * 2. Addresses `box-sizing` set to `border-box` in S5, Chrome (include `-moz` 450 | * to future-proof). 451 | */ 452 | 453 | input[type="search"] { 454 | -webkit-appearance: textfield; /* 1 */ 455 | -moz-box-sizing: content-box; 456 | -webkit-box-sizing: content-box; /* 2 */ 457 | box-sizing: content-box; 458 | } 459 | 460 | /* 461 | * Removes inner padding and search cancel button in S5, Chrome on OS X. 462 | */ 463 | 464 | input[type="search"]::-webkit-search-cancel-button, 465 | input[type="search"]::-webkit-search-decoration { 466 | -webkit-appearance: none; 467 | } 468 | 469 | /* 470 | * Removes inner padding and border in FF3+. 471 | */ 472 | 473 | button::-moz-focus-inner, 474 | input::-moz-focus-inner { 475 | border: 0; 476 | padding: 0; 477 | } 478 | 479 | /* 480 | * 1. Removes default vertical scrollbar in IE6/7/8/9. 481 | * 2. Improves readability and alignment in all browsers. 482 | */ 483 | 484 | textarea { 485 | overflow: auto; /* 1 */ 486 | vertical-align: top; /* 2 */ 487 | } 488 | 489 | /* ========================================================================== 490 | Tables 491 | ========================================================================== */ 492 | 493 | /* 494 | * Remove most spacing between table cells. 495 | */ 496 | 497 | table { 498 | border-collapse: collapse; 499 | border-spacing: 0; 500 | } -------------------------------------------------------------------------------- /states/css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | blockquote, q { 38 | quotes: none; 39 | } 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: ''; 43 | content: none; 44 | } 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } -------------------------------------------------------------------------------- /states/css/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Author: Chris Castiglione 3 | Project: Page Layout 4 | */ 5 | 6 | 7 | /* BASE STYLES */ 8 | 9 | body { 10 | font-family: Helvetica, Arial, sans-serif; 11 | font-size: 12px; 12 | color: black; 13 | line-height: 1.4; 14 | padding: 10px; 15 | background: url('../images/pattern1.png'); /* by default background images repeat */ 16 | } 17 | 18 | 19 | h1 { 20 | margin: 20px 2px; 21 | font-size: 70px; 22 | color: #FFFFFF; 23 | letter-spacing: -3px; 24 | text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2),-1px -1px 3px rgba(0, 0, 0, 0.3); 25 | } 26 | 27 | h2 { 28 | margin: 2px; 29 | font-size: 32px; 30 | color: #333; 31 | cursor: pointer; /*adds a cursor to the h2 so that it looks more clickable */ 32 | } 33 | h2:hover { 34 | color: #000; 35 | } 36 | 37 | a { 38 | text-decoration: none; 39 | color: #333; 40 | } 41 | 42 | /* Layout */ 43 | 44 | #container { 45 | margin: 0 auto; 46 | width: 500px; 47 | color: #333; 48 | } 49 | 50 | #header { 51 | padding: 20px; 52 | } 53 | 54 | #main { 55 | background: white; 56 | padding: 20px; 57 | } 58 | 59 | #footer { 60 | background: #FF6666; 61 | padding: 20px; 62 | text-align: right; 63 | } 64 | 65 | /* Clear fix hack */ 66 | .clearfix:after { 67 | content: "."; 68 | display: block; 69 | clear: both; 70 | visibility: hidden; 71 | line-height: 0; 72 | height: 0; 73 | } 74 | 75 | 76 | 77 | 78 | /* FORM STYLES */ 79 | 80 | form { 81 | width:400px; 82 | padding:14px; 83 | } 84 | label{ 85 | display:block; 86 | font-weight:bold; 87 | text-align:right; 88 | width:140px; 89 | float:left; 90 | } 91 | input, textarea{ 92 | float:left; 93 | font-size:12px; 94 | padding:4px 2px; 95 | border:solid 1px #aacfe4; 96 | width:200px; 97 | margin:2px 0 20px 10px; 98 | } 99 | button.btn { 100 | margin-left: 150px; 101 | } 102 | 103 | .btn { 104 | display: inline-block; 105 | *display: inline; 106 | padding: 4px 12px; 107 | margin-bottom: 0; 108 | *margin-left: .3em; 109 | font-size: 14px; 110 | line-height: 20px; 111 | color: #333333; 112 | text-align: center; 113 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); 114 | vertical-align: middle; 115 | cursor: pointer; 116 | background-color: #f5f5f5; 117 | *background-color: #e6e6e6; 118 | background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); 119 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); 120 | background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); 121 | background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); 122 | background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); 123 | background-repeat: repeat-x; 124 | border: 1px solid #bbbbbb; 125 | *border: 0; 126 | border-color: #e6e6e6 #e6e6e6 #bfbfbf; 127 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 128 | border-bottom-color: #a2a2a2; 129 | -webkit-border-radius: 4px; 130 | -moz-border-radius: 4px; 131 | border-radius: 4px; 132 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); 133 | filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); 134 | *zoom: 1; 135 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 136 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 137 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 138 | } 139 | 140 | .btn:hover, 141 | .btn:active, 142 | .btn.active, 143 | .btn.disabled, 144 | .btn[disabled] { 145 | color: #333333; 146 | background-color: #e6e6e6; 147 | *background-color: #d9d9d9; 148 | } 149 | -------------------------------------------------------------------------------- /states/drink.php: -------------------------------------------------------------------------------- 1 | 5 | query("SELECT * FROM states WHERE id=" . $_REQUEST['id']) or die(mysql_error()); 8 | ?> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Cool! The States 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 |

States Drinks

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 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /states/image/apple-cider.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/apple-cider.jpeg -------------------------------------------------------------------------------- /states/image/coffee-milk.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/coffee-milk.jpeg -------------------------------------------------------------------------------- /states/image/cranberry-juice.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/cranberry-juice.jpeg -------------------------------------------------------------------------------- /states/image/e.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /states/image/kool-aid.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/kool-aid.jpeg -------------------------------------------------------------------------------- /states/image/lemonade.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/lemonade.jpg -------------------------------------------------------------------------------- /states/image/milk.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/milk.jpeg -------------------------------------------------------------------------------- /states/image/moxie.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/moxie.jpeg -------------------------------------------------------------------------------- /states/image/orange-juice.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/orange-juice.jpeg -------------------------------------------------------------------------------- /states/image/pattern1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/pattern1.png -------------------------------------------------------------------------------- /states/image/tomato-juice.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/tomato-juice.jpeg -------------------------------------------------------------------------------- /states/image/water.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/water.jpeg -------------------------------------------------------------------------------- /states/image/whiskey.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/whiskey.jpeg -------------------------------------------------------------------------------- /states/image/wine.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frozen-dev71/SQL-in-30-Days/610da25cd7e90b344b20e8ca8331f890e04c0b8f/states/image/wine.jpeg -------------------------------------------------------------------------------- /states/index.php: -------------------------------------------------------------------------------- 1 | 5 | query("SELECT * FROM states") or die(mysql_error()); 9 | ?> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Cool! The States 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |

States Drinks

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 |
49 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /states/states.sql: -------------------------------------------------------------------------------- 1 | SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; 2 | 3 | 4 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 5 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 6 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 7 | /*!40101 SET NAMES utf8 */; 8 | 9 | -- 10 | -- Database: `states` 11 | -- 12 | 13 | -- -------------------------------------------------------- 14 | 15 | -- 16 | -- Table structure for table `states` 17 | -- 18 | 19 | CREATE TABLE IF NOT EXISTS `states` ( 20 | `id` int(11) NOT NULL AUTO_INCREMENT, 21 | `state` varchar(255) NOT NULL, 22 | `drink` varchar(255) NOT NULL, 23 | `year` int(10) NOT NULL, 24 | `image` varchar(256) NOT NULL, 25 | PRIMARY KEY (`id`) 26 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=32 ; 27 | 28 | -- 29 | -- Dumping data for table `states` 30 | -- 31 | 32 | INSERT INTO `states` (`id`, `state`, `drink`, `year`, `image`) VALUES 33 | (1, 'Alabama', 'Whiskey', 2004, 'whiskey.jpeg'), 34 | (2, 'Arizona', 'Lemonade', 2019, 'lemonade.jpg'), 35 | (5, 'Arkansas', 'Milk', 1985, 'milk.jpeg'), 36 | (6, 'Delaware', 'Milk', 1983, 'milk.jpeg'), 37 | (7, 'Florida', 'Orange Juice', 1967, 'orange-juice.jpeg'), 38 | (8, 'Indiana', 'Water', 2007, 'water.jpeg'), 39 | (9, 'Kentucky', 'Milk', 2005, 'milk.jpeg'), 40 | (10, 'Louisiana', 'Milk', 1983, 'milk.jpeg'), 41 | (11, 'Maine', 'Moxie', 2005, 'moxie.jpeg'), 42 | (12, 'Maryland', 'Milk', 1998, 'milk.jpeg'), 43 | (13, 'Massachusetts', 'Cranberry Juice', 1970, 'cranberry-juice.jpeg'), 44 | (14, 'Minnesota', 'Milk', 1984, 'milk.jpeg'), 45 | (15, 'Mississippi', 'Milk', 1984, 'milk.jpeg'), 46 | (16, 'Nebraska', 'Kool-Aid', 1998, 'kool-aid.jpeg'), 47 | (17, 'New Hampshire', 'Apple Cider', 2010, 'apple-cider.jpeg'), 48 | (18, 'New York', 'Milk', 1981, 'milk.jpeg'), 49 | (19, 'North Carolina', 'Milk', 1987, 'milk.jpeg'), 50 | (20, 'North Dakota', 'Milk', 1983, 'milk.jpeg'), 51 | (21, 'Ohio', 'Tomato Juice', 1965, 'tomato-juice.jpeg'), 52 | (22, 'Oklahoma', 'Milk', 2002, 'milk.jpeg'), 53 | (23, 'Oregon', 'Milk', 1997, 'milk.jpeg'), 54 | (24, 'Pennsylvania', 'Milk', 1982, 'milk.jpeg'), 55 | (25, 'Rhode Island', 'Coffee Milk', 1993, 'coffee-milk.jpeg'), 56 | (26, 'South Carolina', 'Milk', 1984, 'milk.jpeg'), 57 | (27, 'South Dakota', 'Milk', 1986, 'milk.jpeg'), 58 | (28, 'Tennessee', 'Milk', 2009, 'milk.jpeg'), 59 | (29, 'Vermont', 'Milk', 1983, 'milk.jpeg'), 60 | (30, 'Virginia', 'Milk', 1982, 'milk.jpeg'), 61 | (31, 'Wisconsin ', 'Milk', 1987, 'milk.jpeg'); 62 | -------------------------------------------------------------------------------- /users.sql: -------------------------------------------------------------------------------- 1 | 2 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 3 | SET AUTOCOMMIT = 0; 4 | START TRANSACTION; 5 | SET time_zone = "+00:00"; 6 | 7 | 8 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 9 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 10 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 11 | /*!40101 SET NAMES utf8mb4 */; 12 | 13 | -- -------------------------------------------------------- 14 | 15 | -- 16 | -- Table structure for table `users` 17 | -- 18 | 19 | CREATE TABLE `users` ( 20 | `ID` bigint(20) NOT NULL, 21 | `user_login` varchar(60) COLLATE utf8mb4_unicode_520_ci NOT NULL, 22 | `user_pass` varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL, 23 | `user_nicename` varchar(50) COLLATE utf8mb4_unicode_520_ci NOT NULL, 24 | `user_email` varchar(100) COLLATE utf8mb4_unicode_520_ci NOT NULL 25 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; 26 | 27 | 28 | INSERT INTO `users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`) VALUES 29 | (1, 'jsmith', '0832c1202da8d382318e329a7c133ea0', 'jared', 'jsmith@gmail.com'), 30 | (2, 'castig', '$P$Bq.VlkwuWFu4BIktX.olT2eyCVwXv1.', 'chris', 'chris@gmail.com'), 31 | (3, 'mattan', '5f4dcc3b5aa765d61d8327deb882cf99', 'mattan', 'mattan@gmail.com'), 32 | (4, 'zuck', 'f9cQUpQ34BIVlkkt', 'mark', 'zuck@gmail.com'), 33 | (5, 'jamie', 'lH0WC8yboMj/bjt4f3Km/', 'jamie', 'jamie@gmail.com'), 34 | (6, 'wei', '$P$B20YTQ5OHff9cQUpQ4fKNBecfZnYGy.', 'wei', 'wei@gmail.com'), 35 | (7, 'caraadams', 'A7Cx1zD7cbeCWaAOUu/eYyiRU1', 'cara', 'caraadams@gmail.com'), 36 | (8, 'ophir', '$P$B0YwbF0r8r7CHEq/yzhRoc6BolpKeD.', 'ophir', 'ophir@hotmail.com'); 37 | 38 | 39 | ALTER TABLE `users` 40 | ADD PRIMARY KEY (`ID`), 41 | ADD KEY `user_login_key` (`user_login`), 42 | ADD KEY `user_nicename` (`user_nicename`), 43 | ADD KEY `user_email` (`user_email`); 44 | 45 | -- 46 | -- AUTO_INCREMENT for dumped tables 47 | -- 48 | 49 | -- 50 | -- AUTO_INCREMENT for table `users` 51 | -- 52 | ALTER TABLE `users` 53 | MODIFY `ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16; 54 | COMMIT; 55 | 56 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 57 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 58 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 59 | --------------------------------------------------------------------------------