In this video, you will log into MySQL from the command line to add and drop database tables from the database.
- [Instructor] In the last movie,…we created a database that we could use.…And now we're ready to add our first table…to that database.…The way that you create a table in MySQL…is using this syntax.…CREATE TABLE, and then the table name you want to create,…and then inside parentheses,…you're going to provide a set of definitions…for what the columns in that table are going to look like.…So you have column_name1, and then its definition,…a comma, and then column_name2, and its definition,…and so on.…And at the end, there's the opportunity…to provide a few extra options…for how you're going to create that table.…
We'll look at this in more detail.…Once you've created a table,…then you can show the tables,…just like we showed databases.…We can call SHOW TABLES to know what the tables are.…We can show the columns that are from that table,…to see what its structure looks like,…and we can drop the table.…Just like we drop the database,…you can drop a whole table,…which of course erases all its data at the same time.…So, what are we going to create for our database table?…
Author
Released
6/27/2017- Organizing project files
- Including and requiring files
- Working with URL parameters
- Encoding dynamic content
- Modifying headers and page redirection
- Creating forms and processing form data
- MySQL basics
- Using PHP to access database tables
- Creating, reading, updating, and deleting database records with PHP
- Validating data
- Preventing SQL injection
Skill Level Beginner
Duration
Views
Related Courses
-
Introduction
-
Welcome48s
-
-
1. Start a Database-Driven Project
-
Blueprint the application5m 49s
-
Establish your work area6m 27s
-
Make page assets reusable6m 30s
-
-
2. Build Web Pages with PHP
-
Links and URLs9m 40s
-
Use URL parameters8m 49s
-
Encode URL parameters8m 31s
-
Encode for HTML7m 18s
-
Challenge: Add pages3m 26s
-
Solution: Add pages7m 40s
-
-
3. Headers and Redirects
-
Modify headers8m 3s
-
Page redirection7m 1s
-
Output buffering6m 6s
-
-
4. Build Forms with PHP
-
Build forms8m 53s
-
Use form parameters4m 22s
-
Detect form submission5m 24s
-
Single-page form processing6m 45s
-
Challenge: Add forms2m 9s
-
Solution: Add forms5m 1s
-
-
5. MySQL Basics
-
MySQL introduction6m 15s
-
Create a database6m 30s
-
Create a database table6m 20s
-
CRUD in MySQL4m 1s
-
Populate a MySQL table6m 15s
-
Challenge: Pages table3m 51s
-
Solution: Pages table5m 15s
-
-
6. Use PHP to Access MySQL
-
Database APIs in PHP4m 22s
-
Connect to MySQL with PHP8m 56s
-
Retrieve data8m 1s
-
Work with retrieved data6m 50s
-
Error handling6m 51s
-
Challenge: List pages2m 1s
-
Solution: List pages5m 6s
-
-
7. CRUD with PHP
-
Find a single record8m 22s
-
Use form data to create records10m 38s
-
Use form data to update records11m 24s
-
Delete a record8m 23s
-
Challenge: Pages CRUD3m 10s
-
Solution: Pages CRUD8m 1s
-
-
8. Validate Data with PHP
-
Common data validation types9m 11s
-
Validate form values8m 23s
-
Display validation errors10m 11s
-
Solution: Validations8m 1s
-
-
9. Prevent SQL Injection
-
Understand SQL injection5m 17s
-
Sanitize data for SQL8m 57s
-
Delimit data values3m 54s
-
Prepared statements3m 21s
-
-
Conclusion
-
Next steps1m 8s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Create a database table