PDO & MySQL: Connect to MySQL DB using PDO & CRUD Operations

  • Do you want to know how to connect to MySQL Database using PDO?

  • Do you want to know how to write PDO Database Wrapper Class and methods the proper way?

  • Do you want to know how to do CRUD operations with PDO?

  • Do you want to know how to use the rowCount() function the proper way? Note that is the most misused function among PHP PDO developers.

  • Do you want to know how to write simple and complex queries with PDO?

  • Do you want to be able to write slim, concise, reusable and secure code?

If your answer to all these is Yes, Then this course is for you.

In this short course, you are going to learn, practice and do some hands-on exercises on how to:

  • Connect to MySQL Database using PDO

  • Write your first PDO Database Wrapper class

  • Write PDO CRUD methods (i.e. function in a class)

  • Write simple queries – queries without parameters

  • Write secure queries with parameters

  • Get data out of statements – using foreach, fetch(), fetchAll(), fetchColumn()

  • Error handling and Exceptions

  • PDO::rowCount() function explained

  • Get affected rows and last insert Id

  • The problem with Limit Clause in prepare statements

  • Write a simple general function and chaining methods

Author : Armstrong Nana TAGU

Ratings : 5.0 / 5.0

Students : 2,703 students


Category : Development, Web Development, PDO

We will be happy to hear your thoughts

Leave a reply

Register New Account
Reset Password