Learn How To Perform CRUD on MySQL Database Using PDO in PHP

Godson Thomas, Full Stack Web Developer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
17 Lessons (1h 13m)
    • 1. Class Introduction

      1:38
    • 2. What is PDO?

      1:26
    • 3. The PDO Process

      0:54
    • 4. Create A Local Server

      1:29
    • 5. Create A Database

      3:12
    • 6. Connect To The Database

      6:42
    • 7. Insert Data Into A Database

      8:18
    • 8. View Data From Database

      3:50
    • 9. Delete Data From Database

      4:24
    • 10. Count Number of Rows Affected

      1:52
    • 11. Edit Data In Database

      5:22
    • 12. Search Data In The Database

      6:00
    • 13. The Final Project Markup

      4:08
    • 14. The Final Project CSS

      3:31
    • 15. The Final Project PHP

      9:54
    • 16. Live Search Using JavaScript And PDO

      9:38
    • 17. What Next?

      1:00

About This Class

In this class, you will learn how to use PDO (PHP Data Objects) in PHP to perform operations on a database securely. We will be using the MySQL database in this class. But you can use other supported databases and almost all the code will be the same.


We will be using an Object-oriented approach to write the PHP code. So, you will even learn how to create a class, instantiate it and call the methods on the object.

At last, I will develop a web page where all the knowledge you have acquired during the class will be used to create a complete CRUD web page. As a bonus lecture, I will also show you how to code the Live Search mechanism in your webpage where you can perform operations on the database without reloading the page.

For taking this class, it is would be great if you have the following prerequisites:

  • Basic knowledge of PHP programming
  • Basic knowledge of HTML and CSS

Although there are these prerequisites, I will explain each and every line of code that we are going to write. So, even if you are a complete beginner, you can join in. Just follow along and you will learn a lot.


After completing this class, you will be able to perform Insert, Delete, Update and Select operations on your database. This will help you in creating backend applications.


Some examples where you can use this knowledge are:

  • Creating a to-do application
  • Creating a blog
  • Creating a simple registration system
  • Creating contact form
  • And more…

I will you all the best. Keep learning and happy coding.