Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

CRUD Operations with PHP Course (How To)

via Treehouse

Overview

In this course we'll delve into the full spectrum of database interactions. Whether the application is an e-commerce, or social network site, or even a todo app on your phone, the data needs to change over time. CRUD is an acronym that refers to the four main operations that you'd want to perform on data in a database: Create, Read, Update, Delete.

What you'll learn

  • PHP Data Objects (PDO)
  • Creating / Adding Record
  • Reading / Selecting Records
  • Updating / Editing Records
  • Deleting / Removing Records
  • Accepting User Data

Syllabus

Project Setup

In this course we'll be creating a time tracker to keep track of the time spent on projects. We'll use the PHP Data Object to give us all the attributes and actions we need to interact with the database.

Chevron 5 steps
  • What is CRUD?

    1:55

  • Introduction to the Project

    2:20

  • Connecting to the Database

    4:00

  • Handling Exceptions

    4:30

  • CRUD Connections

    7 questions

Creating Records

The first two CRUD operations are the ones we perform most often on a database. Creating the record and Reading the record. We'll examine how PDO allows us to safely complete these operation on a database and how we handle user data.

Chevron 10 steps
  • Reading Project Data

    6:04

  • Accepting User Data

    6:48

  • Reading Data

    2 objectives

  • Adding Projects

    5:57

  • Reading Task Data

    2:35

  • Adding Tasks

    5:55

  • Creating Records

    5 questions

  • Remembering Form Data

    2:36

  • Validating Dates

    5:13

  • Validating User Data

    1 objective

Reading and Writing Reports

One of the great features of having data in a database is the ability to report on that data. Filtering data for different situations and performing calculations on that data. We'll discover how to use this feature to make our time tracker much more useful.

Chevron 9 steps
  • Totaling Time

    3:39

  • Summarizing Project Time

    8:06

  • Calculating Totals

    5 questions

  • Filtering by Project

    6:36

  • Filtering by Category

    3:07

  • Filtering Data

    2 objectives

  • Filtering by Time Period

    5:14

  • Naming Reports

    4:45

  • Working with Dates

    1 objective

Updating and Deleting Records

Mistakes happen. Requirements change. We'll explore ways to handle these changes when it comes to our application and databases in general.

Chevron 7 steps
  • Updating Projects

    9:53

  • Updating Tasks

    5:40

  • Updating Records

    1 objective

  • Deleting Tasks

    6:15

  • Preserving Data Integrity

    6:33

  • Review and Next Steps

    0:45

  • Final Review

    7 questions

Reviews

Start your review of CRUD Operations with PHP Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.