From the course: PHP: Object-Oriented Programming with Databases
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
CRUD operations - PHP Tutorial
From the course: PHP: Object-Oriented Programming with Databases
CRUD operations
- In this chapter, we'll be learning to perform the remaining database operations so that we can implement the object oriented active record design pattern. We're going to be looking at four main operations, and the abbreviation for these is CRUD, c-r-u-d. C is for create, R is for read, U is for update, and D is for delete. Those are the four primary ways that we interact with the database. We create new records, we read existing records, we update existing records, or we delete records. So far, we've already seen how we can read from the database when we learned how to do find all and find by ID. Now we need to learn how to implement the other three. The way that we're going to add that to our project is that we're going to create a staff area, a content management system that'll allow the Chain Gang staff to log in and be able to update the inventory of bicycles using a web interface. They'll be able to create records, update records, delete records, and so on. So the code work…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
CRUD operations5m 59s
-
Create a record9m 35s
-
(Locked)
Dynamic attribute list7m 59s
-
(Locked)
Sanitize values for database4m 40s
-
(Locked)
Find record to update8m 34s
-
(Locked)
Update a record11m 30s
-
(Locked)
HTML forms for OOP5m 38s
-
(Locked)
Validations and errors8m 22s
-
(Locked)
Delete a record7m 21s
-
(Locked)
Create inheritable code11m 12s
-
(Locked)
-
-
-