Learn how to send a subject ID as a URL parameter, use PHP to read the value, and then query the database with an SQL SELECT statement to find the one subject record which matches the value. You will also explore the difference between working with a list
- [Instructor] In the previous chapter,…we learned to use php to retrieve data from the database.…In this chapter, we're going to learn how to use those skills…to perform each part of the database CRUD.…Remember that's create, read, update, and delete.…And we'll begin by learning to find a single record.…So far, we've querying the database for a list of subjects.…But now, we want to find only a single subject…or single record from the database.…The process is similar but there are few key differences.…It's still going to use an SQL select query…just like we did when finding the list of subjects.…
But it's not the same as getting back that full list…because we want to limit the results to only a single subject.…We find that subject by using a WHERE clause with our SELECT…and then using the primary key,…to find the record that we want.…Remember, the primary key is the unique…identifier for each record.…In our case, the primary key is ID and it's pretty standard.…So we would need the php page…to know which subject ID to find.…
- 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
MVC Frameworks for Building PHP Web Applicationswith Drew Falkman2h 57m Intermediate
1. Start a Database-Driven Project
2. Build Web Pages with PHP
3. Headers and Redirects
4. Build Forms with PHP
5. MySQL Basics
6. Use PHP to Access MySQL
7. CRUD with PHP
8. Validate Data with PHP
9. Prevent SQL Injection
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.Cancel
Take 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.